/home/uke/oil/bin/osh builtin-history: spec test case results

Results for builtin-history.test.sh

statusosh
pass 8
total8
caseoshdescription
0pass history -a
1pass history -r
2pass HISTFILE is defined initially
3pass HISTFILE must point to a file
4pass HISTFILE set to array
5pass HISTFILE unset
6pass history -d to delete history item
7pass history usage
8 passed, 0 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh0 history -a

stdout:
1
HISTFILE=tmp
echo 1
history -a
2
HISTFILE=tmp
echo 1
history -a
^D
stderr:
osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ 
osh1 history -r

stdout:
    1  HISTFILE=tmp
    2  history -r
    3  foo
    4  history
^D
stderr:
osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ 
osh2 HISTFILE is defined initially

stdout:
exists
^D
stderr:
osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ 
osh3 HISTFILE must point to a file

stdout:
status=1
^D
stderr:
osh-0.23.0$ osh-0.23.0$ osh-0.23.0$   history -r
  ^~~~~~~
[ stdin -i ]:3: Error reading HISTFILE '_tmp/does-not-exist': No such file or directory
osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ 
osh4 HISTFILE set to array

stdout:
status=1
^D
stderr:
osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ 
osh5 HISTFILE unset

stdout:
status=1
^D
stderr:
osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ 
osh6 history -d to delete history item

stdout:
42
43
44
status=0
status=2
status=2
status=2
^D
stderr:
osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$   history -d -1
             ^~
[ stdin -i ]:11: 'history' got invalid integer for -d: -1
osh-0.23.0$ osh-0.23.0$   history -d -2
             ^~
[ stdin -i ]:13: 'history' got invalid integer for -d: -2
osh-0.23.0$ osh-0.23.0$   history -d 99
  ^~~~~~~
[ stdin -i ]:15: 'history' couldn't find item 99
osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ 
osh7 history usage

stdout:
status=2
status=2
stderr:
  history not-a-number
          ^~~~~~~~~~~~
[ stdin ]:1: 'history' got invalid argument 'not-a-number'
  history 3 too-many
  ^~~~~~~
[ stdin ]:4: 'history' got too many arguments