Results for ysh-purity.test.sh

statusoshosh-cpp
pass 80
FAIL 1018
total1818
caseoshosh-cppdescription
0pass FAIL eval() is a pure function
details
1pass FAIL evalExpr() is a pure function
details
2FAIL FAIL Idiom to handle purity errors from untrusted config files
detailsdetails
3pass FAIL Executor: can run user-defined Procs
details
4pass FAIL Executor: can run Hay (while Hay is hard-coded)
details
5pass FAIL Executor: External Commands not allowed
details
6pass FAIL Command subs, pipelines not allowed with --eval-pure
details
7pass FAIL Process subs, subshells not allowed with eval()
details
8pass FAIL Background job &
details
9FAIL FAIL Redirects
detailsdetails
10FAIL FAIL Are any builtins allowed? true, false
detailsdetails
11FAIL FAIL Are source or use builtins allowed?
detailsdetails
12FAIL FAIL Can log to stderr in pure mode
detailsdetails
13FAIL FAIL io and vm are not allowed
detailsdetails
14FAIL FAIL Can't make an alias of io->eval and call it, etc.
detailsdetails
15FAIL FAIL Globbing not allowed
detailsdetails
16FAIL FAIL $RANDOM $SECONDS
detailsdetails
17FAIL FAIL Purely-evaluated code can't set traps for later
detailsdetails
8 passed, 0 OK, 0 not implemented, 0 BUG, 10 failed, 0 timeouts, 0 cases skipped
10 failed under osh

Details on runs that didn't PASS

osh-cpp0 eval() is a pure function

[osh-cpp stdout] Expected '(Dict) {"a":1,"b":2}\nimpure code=5\n3\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  )
  ^
[ stdin ]:6: Unexpected EOF while parsing command
osh-cpp1 evalExpr() is a pure function

[osh-cpp stdout] Expected 'pure=43\nimpure code=5\nimpure=45\n' Got 'pure=43\n'
[osh-cpp status] Expected 0 Got 2

stdout:
pure=43
stderr:
  var impure = ^[x + $(echo 3)]
                             ^
[ stdin ]:7: Invalid word while parsing command list
osh2 Idiom to handle purity errors from untrusted config files

[osh stdout] Expected '' Got "TODO: what's the idiom?\n"

stdout:
TODO: what's the idiom?
stderr:
osh-cpp2 Idiom to handle purity errors from untrusted config files

[osh-cpp stdout] Expected '' Got "TODO: what's the idiom?\n"

stdout:
TODO: what's the idiom?
stderr:
osh-cpp3 Executor: can run user-defined Procs

[osh-cpp stdout] Expected '(List) ["p-outside","p-inside"]\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  )
  ^
[ stdin ]:17: Unexpected EOF while parsing command
osh-cpp4 Executor: can run Hay (while Hay is hard-coded)

[osh-cpp stdout] Expected '{\n "version": "1.1"\n}\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  )
  ^
[ stdin ]:10: Unexpected EOF while parsing command
osh-cpp5 Executor: External Commands not allowed

[osh-cpp stdout] Expected '1\n2\n3\n' Got ''
[osh-cpp status] Expected 127 Got 2

stdout:
stderr: 
  var cmd = ^(seq 3)
                   ^
[ stdin ]:1: Invalid word while parsing command list
osh-cpp6 Command subs, pipelines not allowed with --eval-pure

[osh-cpp stdout] Expected 'command sub\ncommand-sub.sh=5\ncommand-sub.ysh=5\n\n3\neval\npipeline.sh=5\n' Got '\n3\neval\npipeline.sh=5\n'

stdout:
3
eval
pipeline.sh=5
stderr:
  x=$(echo command sub)
                      ^
command-sub.sh:1: Invalid word while parsing command list
  x=$(echo command sub)
                      ^
command-sub.sh:1: Invalid word while parsing command list
  var x = $(echo command sub)
                            ^
command-sub.ysh:1: Invalid word while parsing command list
  seq 3 | wc -l
        ^
pipeline.sh:1: fatal: Pipelines aren't allowed in pure mode (OILS-ERR-204)
osh-cpp7 Process subs, subshells not allowed with eval()

[osh-cpp stdout] Expected "1\n2\ncode=5 message=Process subs aren't allowed in pure mode (OILS-ERR-204)\n\nsubshell\ncode=5 message=Subshells aren't allowed in pure mode (OILS-ERR-204)\n" Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  var cmd = ^( cat <(echo 1) <(echo 2) )
                           ^
[ stdin ]:3: Invalid word while parsing command list
osh-cpp8 Background job &

[osh-cpp stdout] Expected "code=5 message=Background jobs aren't allowed in pure mode (OILS-ERR-204)\n3\ncode=5 message=Pipelines aren't allowed in pure mode (OILS-ERR-204)\n" Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  var cmd = ^( sleep 0.01 & wait )
                                 ^
[ stdin ]:3: Invalid word while parsing command list
osh9 Redirects

[osh stdout] Expected 'TODO\n' Got "removed 'out.txt'\n"

stdout:
removed 'out.txt'
stderr:
osh-cpp9 Redirects

[osh-cpp stdout] Expected 'TODO\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  var cmd = ^( Package foo > out.txt )
                                     ^
[ stdin ]:4: Invalid word while parsing command list
osh10 Are any builtins allowed? true, false

[osh status] Expected 0 Got 1

stdout:
true
builtin true
command true
stderr:
    builtin false
    ^~~~~~~
[ stdin ]:13: errexit PID 40033: Command failed with status 1
osh-cpp10 Are any builtins allowed? true, false

[osh-cpp stdout] Expected 'true\nbuiltin true\ncommand true\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  )
  ^
[ stdin ]:15: Unexpected EOF while parsing command
osh11 Are source or use builtins allowed?

[osh status] Expected 0 Got 127

stdout:
stderr: 
    source foo.ysh
    ^~~~~~
[ stdin ]:5: Command 'source' not found in pure mode (OILS-ERR-102)
[ stdin ]:5: errexit PID 40054: Command failed with status 127
osh-cpp11 Are source or use builtins allowed?

[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  )
  ^
[ stdin ]:7: Unexpected EOF while parsing command
osh12 Can log to stderr in pure mode

[osh status] Expected 0 Got 127

stdout:
stderr: 
    log "hi $name"
    ^~~
[ stdin ]:7: Command 'log' not found (OILS-ERR-100)
[ stdin ]:7: errexit PID 40075: Command failed with status 127
osh-cpp12 Can log to stderr in pure mode

[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  )
  ^
[ stdin ]:8: Unexpected EOF while parsing command
osh13 io and vm are not allowed

[osh stdout] Expected '' Got '<Frame 0x7fa7ff975a00>\n(Int) 140359524376480\n<Stdin>\n<Frame 0x7fa7ff9753c0>\n(Int) 140359524373440\n<Stdin>\n'

stdout:
<Frame 0x7fa7ff975a00>
(Int)   140359524376480
<Stdin>
<Frame 0x7fa7ff9753c0>
(Int)   140359524373440
<Stdin>
stderr:
osh-cpp13 io and vm are not allowed

[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  )
  ^
[ stdin ]:6: Unexpected EOF while parsing command
osh14 Can't make an alias of io->eval and call it, etc.

[osh stdout] Expected '' Got 'hi\n'

stdout:
hi
stderr:
osh-cpp14 Can't make an alias of io->eval and call it, etc.

[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  var cmd = ^(echo hi)
                     ^
[ stdin ]:6: Invalid word while parsing command list
osh15 Globbing not allowed

[osh stdout] Expected '' Got '*.txt\n'
[osh status] Expected 0 Got 127

stdout:
*.txt
stderr:
    echo *.txt
    ^~~~
[ stdin ]:2: Command 'echo' not found in pure mode (OILS-ERR-102)
osh-cpp15 Globbing not allowed

[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  )
  ^
[ stdin ]:3: Unexpected EOF while parsing command
osh16 $RANDOM $SECONDS

[osh status] Expected 0 Got 1

stdout:
stderr: 
    echo not-implemented=$RANDOM
                         ^~~~~~~
[ stdin ]:4: fatal: Undefined variable 'RANDOM'
osh-cpp16 $RANDOM $SECONDS

[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  )
  ^
[ stdin ]:6: Unexpected EOF while parsing command
osh17 Purely-evaluated code can't set traps for later

[osh status] Expected 0 Got 127

stdout:
stderr: 
    trap 'echo INT' INT
    ^~~~
[ stdin ]:2: Command 'trap' not found in pure mode (OILS-ERR-102)
osh-cpp17 Purely-evaluated code can't set traps for later

[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  )
  ^
[ stdin ]:3: Unexpected EOF while parsing command