Results for builtin-history.test.sh

statusbashosh
pass 58
ok 30
total88
casebashoshdescription
0pass pass history -a
1pass pass history -r
2pass pass HISTFILE is defined initially
3pass pass HISTFILE must point to a file
4ok pass HISTFILE set to array
details
5pass pass HISTFILE unset
6ok pass history -d to delete history item
details
7ok pass history usage
details
13 passed, 3 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

bash4 HISTFILE set to array

stdout:
status=0
^D
stderr:
bash-4.4$ 
bash-4.4$ HISTFILE=(a b c)
bash-4.4$ history -a
bash-4.4$ echo status=$?
bash-4.4$ 
bash-4.4$ exit
bash6 history -d to delete history item

stdout:
42
43
44
status=0
status=1
status=1
status=1
^D
stderr:
bash-4.4$ 
bash-4.4$ echo 42
bash-4.4$ echo 43
bash-4.4$ echo 44
bash-4.4$ 
bash-4.4$ history -a
bash-4.4$ 
bash-4.4$ history -d 1
bash-4.4$ echo status=$?
bash-4.4$ 
bash-4.4$ history -d -1
bash: history: -1: history position out of range
bash-4.4$ echo status=$?
bash-4.4$ history -d -2
bash: history: -2: history position out of range
bash-4.4$ echo status=$?
bash-4.4$ history -d 99
bash: history: 99: history position out of range
bash-4.4$ echo status=$?
bash-4.4$ 
bash-4.4$ case $SH in bash) echo '^D' ;; esac
bash-4.4$ 
bash-4.4$ exit
bash7 history usage

stdout:
status=1
status=1
stderr:
bash: line 1: history: not-a-number: numeric argument required
bash: line 4: history: too many arguments