oilshell / oil

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.78k stars 150 forks source link

Fixes spec cpp counts #2011

Closed momiji closed 5 days ago

momiji commented 6 days ago

Without the fix, the following fails with:

ysh-builtin-shopt: FATAL: Got 2 failures (1 oils failures), but 1 are allowed

With the fix, it is fine, as both osh python and osh native works the same.

$ test/spec-cpp.sh run-file ysh-builtin-shopt
ysh-builtin-shopt.test.sh
case    line    osh     osh-cpp
  0       3     pass    pass    shopt supports long flags
  1      17     pass    pass    shopt supports 'set' options
  2      30     pass    pass    shopt --unset errexit { }
  3      51     pass    pass    shopt -p works correctly inside block
  4      65     pass    pass    shopt --set GROUP { }
  5     111     pass    pass    shopt and block status
  6     124     pass    pass    shopt usage error
  7     137     pass    pass    shopt -p
  8     162     FAIL    FAIL    TODO: all options as a table

                osh     osh-cpp
        pass    8       8
        FAIL    1       1
        total   9       9
ysh-builtin-shopt: note: Got 2 allowed oils failures (exit with code 0)
andychu commented 5 days ago

OK I changed the accounting a slightly different way

Thanks for noticing this! That was indeed a bit confusing