Results for builtin-history.test.sh

statusbashosh
pass 58
ok 20
BUG 10
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
6BUG pass history -d to delete history item
details
7ok pass history usage
details
13 passed, 2 OK, 0 not implemented, 1 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: cannot set terminal process group (2688): Inappropriate ioctl for device
bash: no job control in this shell
bash-5.2$ 
bash-5.2$ HISTFILE=(a b c)
bash-5.2$ history -a
bash-5.2$ echo status=$?
bash-5.2$ 
bash-5.2$ exit
bash6 history -d to delete history item

stdout:
42
43
44
status=0
status=0
status=0
status=1
^D
stderr:
bash: cannot set terminal process group (2688): Inappropriate ioctl for device
bash: no job control in this shell
bash-5.2$ 
bash-5.2$ echo 42
bash-5.2$ echo 43
bash-5.2$ echo 44
bash-5.2$ 
bash-5.2$ history -a
bash-5.2$ 
bash-5.2$ history -d 1
bash-5.2$ echo status=$?
bash-5.2$ 
bash-5.2$ history -d -1
bash-5.2$ echo status=$?
bash-5.2$ history -d -2
bash-5.2$ echo status=$?
bash-5.2$ history -d 99
bash: history: 99: history position out of range
bash-5.2$ echo status=$?
bash-5.2$ 
bash-5.2$ case $SH in bash*) echo '^D' ;; esac
bash-5.2$ 
bash-5.2$ 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