oils-for-unix / oils

Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!
http://www.oilshell.org/
Other
2.85k stars 159 forks source link

Add failing arith-dynamic spec tests #2070

Closed PossiblyAShrub closed 2 months ago

PossiblyAShrub commented 2 months ago

These cases were extracted from the discussion on Zulip

(#oil-dev>ArithSub evaluation bug in autotools configure)

andychu commented 2 months ago

Looks good! For some reason the CI failed though

http://op.oilshell.org/uuu/github-jobs/7854/ovm-tarball.wwz/_tmp/soil/logs/osh-spec.txt

done: all-tests-to-html
Error reading line from file: _tmp/spec/osh-py/arith-dynamic.stats.txt

Oh probably because there needs to be a stub in test/spec.sh ? (I have been meaning to get rid of that file somehow, though it does provide auto-completion for each "task")

andychu commented 2 months ago

Oh unrelated but I also remembered we want to add the same behavior to replace() that we did with split() -- there is that potential infinite loop now

PossiblyAShrub commented 2 months ago

Oh probably because there needs to be a stub in test/spec.sh ? (I have been meaning to get rid of that file somehow, though it does provide auto-completion for each "task")

Yep, I think that was it.

re: removing this file, it would be nice if you could do test/spec-py.sh run-file spec/arith-dynamic.test.sh. Then you could rely on the file-system for auto-completion. Right now that errors with No such file or directory: 'spec/spec/arith-dynamic.test.sh.test.sh'.

andychu commented 2 months ago

Yes true, we should just use file system completion!

Originally all those functions had a list of shells and --failures-allowed , but now that's in the file itself

--

Thanks for the spec tests!