welp. and i'm done lol

This commit is contained in:
2026-01-14 20:59:18 +05:30
parent 2c7a420323
commit 1ae8c7b94a
2 changed files with 16 additions and 0 deletions

View File

@@ -7,5 +7,10 @@ int main(int argc, char **argv){
PRINT_ERROR("%s obviously needs arguments to work…", NAME); PRINT_ERROR("%s obviously needs arguments to work…", NAME);
return 1; return 1;
} }
for (int i=0; i<argc; i++){
char *arg = argv[i][0] == '\0' ? "''" : argv[i];
printf ( "@%d\t%s\n", i, arg);
}
return 0; return 0;
} }

View File

@@ -11,5 +11,16 @@ setup(){
@test "no args? you fail." { @test "no args? you fail." {
run args run args
assert_output --partial "args obviously needs arguments to work…"
assert_failure assert_failure
} }
@test "one arg" {
run args one
assert_output --partial "@1"$'\t'"one"
}
@test "represent empty string" {
run args ''
assert_output --partial "@1"$'\t'"''"
}