1 # This program is free software: you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation, either version 3 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 trap 'rm $TMPDIR/newhistory' 0
18 # cannot use -r and -w at the same time
19 history -r -w /dev/null
26 # all of these should result in an empty history list
33 HISTCONTROL=ignoreboth
34 HISTIGNORE='&:history*:fc*'
49 history -s "echo line for history"
56 HISTFILE=$TMPDIR/newhistory
58 echo displaying \$HISTFILE after history -a
65 history -s "echo line 2 for history"
70 # this should show up as one history entry
71 for x in one two three
77 # just a basic test. a full test suite for history expansion should be
89 # now an out-of-range error because of the one=two not found in history
90 fc -l one=two three=four 502
95 shopt -s expand_aliases
104 # this had better fail with `no command found'
110 # these two blocks had better both result in the same output
126 ${THIS_SH} ./history1.sub
127 rm -f $TMPDIR/foohist-*
129 ${THIS_SH} ./history2.sub
130 ${THIS_SH} ./history3.sub
131 ${THIS_SH} ./history4.sub
132 ${THIS_SH} ./history5.sub