run-file-with-osh () { _run-file-with-one $REPO_ROOT/bin/osh "$@" } /home/uke/oil/bin/osh
spec test index / oilshell.org
| status | osh | |
| pass | 8 | |
| total | 8 | |
| case | osh | description |
| 0 | pass | history -a |
| 1 | pass | history -r |
| 2 | pass | HISTFILE is defined initially |
| 3 | pass | HISTFILE must point to a file |
| 4 | pass | HISTFILE set to array |
| 5 | pass | HISTFILE unset |
| 6 | pass | history -d to delete history item |
| 7 | pass | history usage |
8 passed, 0 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped
| osh | 0 history -a stdout: 1 HISTFILE=tmp echo 1 history -a 2 HISTFILE=tmp echo 1 history -a ^Dstderr: osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ |
| osh | 1 history -r stdout: 1 HISTFILE=tmp
2 history -r
3 foo
4 history
^D
stderr: osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ |
| osh | 2 HISTFILE is defined initially stdout: exists ^Dstderr: osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ |
| osh | 3 HISTFILE must point to a file stdout: status=1 ^Dstderr: osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ history -r ^~~~~~~ [ stdin -i ]:3: Error reading HISTFILE '_tmp/does-not-exist': No such file or directory osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ |
| osh | 4 HISTFILE set to array stdout: status=1 ^Dstderr: osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ |
| osh | 5 HISTFILE unset stdout: status=1 ^Dstderr: osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ |
| osh | 6 history -d to delete history item stdout: 42 43 44 status=0 status=2 status=2 status=2 ^Dstderr: osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ history -d -1
^~
[ stdin -i ]:11: 'history' got invalid integer for -d: -1
osh-0.22.0$ osh-0.22.0$ history -d -2
^~
[ stdin -i ]:13: 'history' got invalid integer for -d: -2
osh-0.22.0$ osh-0.22.0$ history -d 99
^~~~~~~
[ stdin -i ]:15: 'history' couldn't find item 99
osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ osh-0.22.0$ |
| osh | 7 history usage stdout: status=2 status=2stderr: history not-a-number
^~~~~~~~~~~~
[ stdin ]:1: 'history' got invalid argument 'not-a-number'
history 3 too-many
^~~~~~~
[ stdin ]:4: 'history' got too many arguments
|