Fix xy.c to pass test

This commit is contained in:
Aoran Zeng 2024-05-25 01:02:30 +08:00
parent e606185c86
commit 8b2cc352fd
2 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ test: $(Target)
./$(Target) get python ./$(Target) get python
test_xy: test_xy:
@$(CC) test/xy.c -o xy @$(CC) test/xy.c $(CFLAGS) -o xy
@./xy @./xy
clean: clean:

View File

@ -3,14 +3,14 @@
* License : MIT * License : MIT
* Authors : Aoran Zeng <ccmywish@qq.com> * Authors : Aoran Zeng <ccmywish@qq.com>
* Created on : <2023-08-30> * Created on : <2023-08-30>
* Last modified : <2024-05-24> * Last modified : <2024-05-25>
* *
* test_xy: * test_xy:
* *
* xy.h * xy.h
* ------------------------------------------------------------*/ * ------------------------------------------------------------*/
#include "../xy.h" #include "xy.h"
int int
main (int argc, char const *argv[]) main (int argc, char const *argv[])
@ -78,9 +78,9 @@ main (int argc, char const *argv[])
xy_warn ("警告:输出警告内容"); xy_warn ("警告:输出警告内容");
xy_error ("错误:输出错误内容"); xy_error ("错误:输出错误内容");
assert (xy_file_exist ("chsrc.png")); assert (xy_file_exist ("./image/chsrc.png"));
assert (xy_file_exist (xy_win_powershell_profile)); assert (xy_file_exist (xy_win_powershell_profile));
assert (false == xy_file_exist (xy_win_powershellv5_profile)); assert (true == xy_file_exist (xy_win_powershellv5_profile));
puts (xy_uniform_path (" \n ~/haha/test/123 \n\r ")); puts (xy_uniform_path (" \n ~/haha/test/123 \n\r "));
assert_str (xy_uniform_path ("~/haha/test"), assert_str (xy_uniform_path ("~/haha/test"),