Results for ysh-purity.test.sh

statusoshosh_ALT
pass 88
FAIL 1010
total1818
caseoshosh_ALTdescription
0pass pass eval() is a pure function
1pass pass evalExpr() is a pure function
2FAIL FAIL Idiom to handle purity errors from untrusted config files
detailsdetails
3pass pass Executor: can run user-defined Procs
4pass pass Executor: can run Hay (while Hay is hard-coded)
5pass pass Executor: External Commands not allowed
6pass pass Command subs, pipelines not allowed with --eval-pure
7pass pass Process subs, subshells not allowed with eval()
8pass pass Background job &
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
16 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

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_ALT2 Idiom to handle purity errors from untrusted config files

[osh_ALT stdout] Expected '', got "TODO: what's the idiom?\n"

stdout:
TODO: what's the idiom?
stderr:
osh9 Redirects

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

stdout:
removed 'out.txt'
stderr:
osh_ALT9 Redirects

[osh_ALT stdout] Expected 'TODO\n', got "removed 'out.txt'\n"

stdout:
removed 'out.txt'
stderr:
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 8132: Command failed with status 1
osh_ALT10 Are any builtins allowed? true, false

[osh_ALT status] Expected 0, got 1

stdout:
true
builtin true
command true
stderr:
    builtin false
    ^~~~~~~
[ stdin ]:13: errexit PID 8135: Command failed with status 1
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 8136: Command failed with status 127
osh_ALT11 Are source or use builtins allowed?

[osh_ALT 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 8139: Command failed with status 127
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 8140: Command failed with status 127
osh_ALT12 Can log to stderr in pure mode

[osh_ALT status] Expected 0, got 127

stdout:
stderr: 
    log "hi $name"
    ^~~
[ stdin ]:7: Command 'log' not found (OILS-ERR-100)
[ stdin ]:7: errexit PID 8143: Command failed with status 127
osh13 io and vm are not allowed

[osh stdout] Expected '', got '<Frame 0x7fbab022fa50>\n(Int) 140439795727728\n<Stdin>\n<Frame 0x7fbab022ff50>\n(Int) 140439795728208\n<Stdin>\n'

stdout:
<Frame 0x7fbab022fa50>
(Int)   140439795727728
<Stdin>
<Frame 0x7fbab022ff50>
(Int)   140439795728208
<Stdin>
stderr:
osh_ALT13 io and vm are not allowed

[osh_ALT stdout] Expected '', got '<Frame 0x7fdd11585048>\n(Int) 140587455500360\n<Stdin>\n<Frame 0x7fdd11585048>\n(Int) 140587455500360\n<Stdin>\n'

stdout:
<Frame 0x7fdd11585048>
(Int)   140587455500360
<Stdin>
<Frame 0x7fdd11585048>
(Int)   140587455500360
<Stdin>
stderr:
osh14 Can't make an alias of io->eval and call it, etc.

[osh stdout] Expected '', got 'hi\n'

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

[osh_ALT stdout] Expected '', got 'hi\n'

stdout:
hi
stderr:
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_ALT15 Globbing not allowed

[osh_ALT stdout] Expected '', got '*.txt\n'
[osh_ALT status] Expected 0, got 127

stdout:
*.txt
stderr:
    echo *.txt
    ^~~~
[ stdin ]:2: Command 'echo' not found in pure mode (OILS-ERR-102)
osh16 $RANDOM $SECONDS

[osh status] Expected 0, got 1

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

[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
    echo not-implemented=$RANDOM
                         ^~~~~~~
[ stdin ]:4: fatal: Undefined variable 'RANDOM'
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_ALT17 Purely-evaluated code can't set traps for later

[osh_ALT status] Expected 0, got 127

stdout:
stderr: 
    trap 'echo INT' INT
    ^~~~
[ stdin ]:2: Command 'trap' not found in pure mode (OILS-ERR-102)