From 6c20c8ed2cb9ab69a1a57ccb2b9b79969a808321 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:38:56 +0200 Subject: Adding upstream version 5.2.15. Signed-off-by: Daniel Baumann --- tests/history.right | 299 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 299 insertions(+) create mode 100644 tests/history.right (limited to 'tests/history.right') diff --git a/tests/history.right b/tests/history.right new file mode 100644 index 0000000..5273de6 --- /dev/null +++ b/tests/history.right @@ -0,0 +1,299 @@ +./history.tests: line 17: history: -x: invalid option +history: usage: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...] +./history.tests: line 19: history: cannot use more than one of -anrw +./history.tests: line 22: fc: -v: invalid option +fc: usage: fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command] + 1 for i in one two three; do echo $i; done + 2 /bin/sh -c 'echo this is $0' + 3 ls + 4 echo $BASH_VERSION +1 for i in one two three; do echo $i; done +2 /bin/sh -c 'echo this is $0' +3 ls +4 echo $BASH_VERSION + for i in one two three; do echo $i; done + /bin/sh -c 'echo this is $0' + ls + echo $BASH_VERSION +4 echo $BASH_VERSION +3 ls +2 /bin/sh -c 'echo this is $0' +1 for i in one two three; do echo $i; done + echo $BASH_VERSION + ls + /bin/sh -c 'echo this is $0' + for i in one two three; do echo $i; done + 1 for i in one two three; do echo $i; done + 2 /bin/sh -c 'echo this is $0' + 3 ls + 4 echo $BASH_VERSION + 5 echo line for history +echo line for history + for i in one two three; do echo $i; done + /bin/sh -c 'echo this is $0' + ls + echo $BASH_VERSION + echo line for history +displaying $HISTFILE after history -a +echo line for history +HISTFILE=$TMPDIR/newhistory + 1 for i in one two three; do echo $i; done + 2 /bin/sh -c 'echo this is $0' + 3 ls + 4 echo $BASH_VERSION + 5 echo line for history + 6 HISTFILE=$TMPDIR/newhistory + 7 echo displaying \$HISTFILE after history -a + 8 cat $HISTFILE +for i in one two three; do echo $i; done +/bin/sh -c 'echo this is $0' +ls +echo $BASH_VERSION +echo line for history +HISTFILE=$TMPDIR/newhistory +echo displaying \$HISTFILE after history -a +cat $HISTFILE + 1 for i in one two three; do echo $i; done + 2 /bin/sh -c 'echo this is $0' + 3 ls + 4 echo $BASH_VERSION + 5 echo line for history + 6 HISTFILE=$TMPDIR/newhistory + 7 echo displaying \$HISTFILE after history -a + 8 cat $HISTFILE + 9 echo line 2 for history +echo line 2 for history +echo line 2 for history + 1 for i in one two three; do echo $i; done + 2 /bin/sh -c 'echo this is $0' + 3 ls + 4 echo $BASH_VERSION + 5 echo line for history + 6 HISTFILE=$TMPDIR/newhistory + 7 echo displaying \$HISTFILE after history -a + 8 cat $HISTFILE + 9 echo line 2 for history + 10 # this should show up as one history entry + 11 for x in one two three; do :; done +set -H +echo line 2 for history +line 2 for history +4 echo $BASH_VERSION +5 echo line for history +6 HISTFILE=$TMPDIR/newhistory +7 echo displaying \$HISTFILE after history -a +8 cat $HISTFILE +9 echo line 2 for history +10 # this should show up as one history entry +11 for x in one two three; do :; done +12 # just a basic test. a full test suite for history expansion should be +13 # created +14 set -H +15 echo line 2 for history +16 unset HISTSIZE +17 unset HISTFILE +4 echo $BASH_VERSION +5 echo line for history +6 HISTFILE=$TMPDIR/newhistory +7 echo displaying \$HISTFILE after history -a +8 cat $HISTFILE +./history.tests: line 90: fc: no command found + 15 echo line 2 for history + 16 unset HISTSIZE + 17 unset HISTFILE + 18 # now an out-of-range error because of the one=two not found in history +aa ab ac +echo xx xb xc +xx xb xc +echo 44 48 4c +44 48 4c +./history.tests: line 105: fc: no command found +aa +bb +cc +echo cc +echo cc +cc +aa +bb +cc +echo cc +echo cc +cc +1 +one +two +three + 1 cat <