E81002: orphan expected output file (no matching commandline args)
What went wrong
An expected_case_{id}.txt file exists but no matching commandline_arg_{id}.txt. Parameterized tests require both files with matching {id}.
Worked examples
Compilable examples demonstrating this error and the correct fix:
- ek9 -q 953 (How do @Test programs work with command-line arguments...)
File naming pattern
Each expected_case_{id}.txt pairs with the commandline_arg_{id}.txt of the same {id}. For instance, a dev/ directory holding expected_case_goodbye.txt but no commandline_arg_goodbye.txt is this error.
How to fix it
- Create missing file: `touch dev/commandline_arg_{id}.txt` (one arg per line)
- Or remove orphan expected file if test isn't needed
- Or rename if typo (check -E2 for fuzzy suggestions)
Common causes
- Deleted commandline file but forgot expected file
- Case mismatch: 'Test' vs 'test' (same on macOS, different on Linux)
See also
Examples
Every example is compiled by the EK9 compiler: the first fails exactly as captioned, the others fix it.
Fails with E81002: orphan expected output file (no matching commandline args) - reported by the test runner, not the compiler, when ek9 -t greeting.ek9 runs in this project.
bad/greeting.ek9
#!ek9 defines module error.e81002.bad defines function greeting() as pure -> name as String <- result as String: `Hello, ${name}`
bad/dev/tests.ek9
#!ek9 defines module error.e81002.bad.tests references error.e81002.bad::greeting defines program @Test GreetingCases() -> name as String stdout <- Stdout() stdout.println(greeting(name))
bad/dev/commandline_arg_simple.txt
EK9
bad/dev/expected_case_other.txt
Hello, World
bad/dev/expected_case_simple.txt
Hello, EK9
$ ek9 -t greeting.ek9
ℹ️ Found 1 test:
1 parameterized (1 cases total)
Executing 1 test...
❌ FAIL error.e81002.bad.tests::GreetingCases [Assert] (nms)
Test configuration error: missing commandline_arg_other.txt
Summary: 0 passed, 1 failed (1 total)
Types: 1 assert
Duration: nms
ek9: tests failed (exit 11)
E81002: orphan expected output file (no matching commandline args)
missing commandline_arg_other.txt
See: ek9 -h E81002
Fixed: The orphan expected_case_other.txt gets its commandline_arg_other.txt
good/greeting.ek9
#!ek9 defines module error.e81002.good defines function greeting() as pure -> name as String <- result as String: `Hello, ${name}`
good/dev/tests.ek9
#!ek9 defines module error.e81002.good.tests references error.e81002.good::greeting defines program @Test GreetingCases() -> name as String stdout <- Stdout() stdout.println(greeting(name))
good/dev/commandline_arg_other.txt
World
good/dev/commandline_arg_simple.txt
EK9
good/dev/expected_case_other.txt
Hello, World
good/dev/expected_case_simple.txt
Hello, EK9
$ ek9 -t greeting.ek9
ℹ️ Found 1 test:
1 parameterized (2 cases total)
Executing 1 test...
✅ PASS error.e81002.good.tests::GreetingCases [Param:other] (nms)
✅ PASS error.e81002.good.tests::GreetingCases [Param:simple] (nms)
Summary: 2 passed, 0 failed (2 results from 1 programs)
Types: 2 parameterized
Duration: nms
Found a problem?
If EK9 reported E81002 for a program you think is valid, or did not report it where it should have, use the compiler form with the smallest program that shows it. If this page is wrong or unclear, use the documentation form. Both are at github.com/ek9lang/ek9-issues.