--- FAIL: TestRunnerRun/#435 (0.01s)
interp_test.go:3233: wrong output in "touch -t 202111050000 a; touch -t 202111060000 b; [[ a -ot b ]]":
want: ""
got: "exit status 1"
FAIL
I believe @riacataquian also ran into this failure, also on Windows.
The tests use touch -t instead of touch -d since d36d14903235de79f41ca3bea388f83ce33ad174, but the test builtin only implements -d. So we are effectively having test -t 123 foo create three files -t, 123, and foo - without a custom timestamp :see_no_evil:
The fix is: 1) fix up the touch implementation in interp_test.go to support the -t flag, and 2) add some sanity check that none of the interp_test.go builtins are misusing flags as arguments. For instance, by failing if any argument begins with a dash.
This is not a bug in the interpreter, but still a bug - in the test code.
https://github.com/mvdan/sh/runs/4669017549?check_suite_focus=true
I believe @riacataquian also ran into this failure, also on Windows.
The tests use
touch -t
instead oftouch -d
since d36d14903235de79f41ca3bea388f83ce33ad174, but the test builtin only implements-d
. So we are effectively havingtest -t 123 foo
create three files-t
,123
, andfoo
- without a custom timestamp :see_no_evil:The fix is: 1) fix up the touch implementation in interp_test.go to support the
-t
flag, and 2) add some sanity check that none of the interp_test.go builtins are misusing flags as arguments. For instance, by failing if any argument begins with a dash.This is not a bug in the interpreter, but still a bug - in the test code.