55 * Contributors : Nil Null <[email protected] > 66 * |
77 * Created On : <2024-12-14>
8- * Last Modified : <2025-06-20 >
8+ * Last Modified : <2025-07-14 >
99 * ------------------------------------------------------------*/
1010
1111#define Chsrc_Version "Frameworker"
@@ -28,27 +28,22 @@ main (int argc, char const *argv[])
2828 chsrc_info ("chsrc_info" );
2929 chsrc_warn ("chsrc_warn" );
3030 chsrc_error ("chsrc_error" );
31- chsrc_debug ("chsrc_debug" );
31+ chsrc_debug ("fw" , " chsrc_debug" );
3232 chsrc_verbose ("chsrc_verbose" );
3333
3434 chsrc_succ2 ("chsrc_succ2" );
3535 chsrc_log2 ("chsrc_log2" );
3636 chsrc_note2 ("chsrc_note2" );
3737 chsrc_warn2 ("chsrc_warn2" );
3838 chsrc_error2 ("chsrc_error2" );
39- chsrc_debug2 ("chsrc_debug2" );
39+ chsrc_debug2 ("fw" , " chsrc_debug2" );
4040 chsrc_verbose2 ("chsrc_verbose2" );
4141
42- #ifdef XY_On_Windows
43- #define fw ".\\fw.exe"
44- #else
45- #define fw "./fw"
46- #endif
47-
48- assert (chsrc_check_program (fw ));
49- assert (chsrc_check_program_quietly (fw ));
50- assert (chsrc_check_program_quietly_when_exist (fw ));
51- chsrc_ensure_program (fw );
42+ // 现在 chsrc_check_program() 无法检测本目录文件了
43+ assert (chsrc_check_program ("curl" ));
44+ assert (chsrc_check_program_quietly ("curl" ));
45+ assert (chsrc_check_program_quietly_when_exist ("curl" ));
46+ chsrc_ensure_program ("curl" );
5247
5348 #define bkup "README.md.bak"
5449
@@ -77,6 +72,12 @@ main (int argc, char const *argv[])
7772 {
7873 chsrc_run ("rm " bkup , RunOpt_No_Last_New_Line );
7974 }
75+
76+ char * tmpfile = NULL ;
77+ FILE * tmp = chsrc_make_tmpfile ("tmpfile" , ".txt" , true, & tmpfile );
78+ fclose (tmp );
79+ remove (tmpfile );
80+
8081 chsrc_run ("echo " Chsrc_Version " test pass!" , RunOpt_Dont_Notify_On_Success );
8182 return 0 ;
8283}
0 commit comments