E81014: orphan envvars file (no matching commandline args)
What went wrong
An envvars file exists but no test case matches it - there are no commandline arguments it belongs to, so it is never used by any test.
How to fix it
- Check the filename matches the test case it is meant to supply.
- Add the matching commandline-args file, so the envvars file has a case.
- Or delete the envvars file if the case it served has gone.
Rationale
An input file nothing reads is indistinguishable from a test that is not running. Reporting it keeps a test directory honest about what it actually exercises.
See also
Examples
Every example is compiled by the EK9 compiler: the first fails exactly as captioned, the others fix it.
Fails with E81014: orphan envvars 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.e81014.bad defines function greeting() as pure -> name as String <- result as String: `Hello, ${name}`
bad/dev/tests.ek9
#!ek9 defines module error.e81014.bad.tests references error.e81014.bad::greeting defines program @Test GreetingCases() -> name as String stdout <- Stdout() stdout.println(greeting(name))
bad/dev/commandline_arg_simple.txt
EK9
bad/dev/envvars_arg_other.txt
GREETING_MODE=loud
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.e81014.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)
E81014: orphan envvars file (no matching commandline args)
missing commandline_arg_other.txt
See: ek9 -h E81014
Fixed: The envvars file belongs to a case: commandline_arg_other.txt
good/greeting.ek9
#!ek9 defines module error.e81014.good defines function greeting() as pure -> name as String <- result as String: `Hello, ${name}`
good/dev/tests.ek9
#!ek9 defines module error.e81014.good.tests references error.e81014.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/envvars_arg_other.txt
GREETING_MODE=loud
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.e81014.good.tests::GreetingCases [Param:other] (nms)
✅ PASS error.e81014.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 E81014 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.