mirror of
https://github.com/RubyMetric/chsrc
synced 2025-06-08 03:04:03 +08:00
Fix xy.c to pass test
This commit is contained in:
parent
e606185c86
commit
8b2cc352fd
2
Makefile
2
Makefile
@ -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:
|
||||||
|
@ -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"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user