Reorganize task categories from opaque a/b to descriptive names
Replace category_a/category_b directories with algorithm, pipeline, environment, filesystem, and process. Add separate mode field (solve/convert) to decouple orchestration from capability grouping. Add per-category summary and questionnaire breakdowns to both terminal report and HTML export.
This commit is contained in:
40
tasks/process/process_exit_codes.toml
Normal file
40
tasks/process/process_exit_codes.toml
Normal file
@@ -0,0 +1,40 @@
|
||||
name = "process_exit_codes"
|
||||
category = "process"
|
||||
mode = "solve"
|
||||
description = """
|
||||
Read commands from stdin, one per line. Execute each command as a subprocess.
|
||||
For each command, print: "command: exit_code" where command is the original command text
|
||||
and exit_code is the numeric exit code of the process.
|
||||
|
||||
After all commands, print a blank line followed by a summary line:
|
||||
"passed: N, failed: M"
|
||||
where N is the count of commands with exit code 0, and M is the count with non-zero exit codes.
|
||||
"""
|
||||
|
||||
[[test_cases]]
|
||||
stdin = """true
|
||||
false
|
||||
echo hello
|
||||
test -f /nonexistent"""
|
||||
expected_stdout = """true: 0
|
||||
false: 1
|
||||
echo hello: 0
|
||||
test -f /nonexistent: 1
|
||||
|
||||
passed: 2, failed: 2"""
|
||||
|
||||
[[test_cases]]
|
||||
stdin = """true
|
||||
true
|
||||
true"""
|
||||
expected_stdout = """true: 0
|
||||
true: 0
|
||||
true: 0
|
||||
|
||||
passed: 3, failed: 0"""
|
||||
|
||||
[[test_cases]]
|
||||
stdin = "false"
|
||||
expected_stdout = """false: 1
|
||||
|
||||
passed: 0, failed: 1"""
|
||||
Reference in New Issue
Block a user