From 4c46770566424a7054dc84d8a6a29e35682cb638 Mon Sep 17 00:00:00 2001 From: Martin Dvorak Date: Tue, 21 Aug 2018 17:46:45 +0200 Subject: [PATCH] HSTR/HH reconciliation in tests. --- build/test-gdb.sh | 2 +- build/test-memleaks.sh | 4 ++-- build/test-units.sh | 8 ++++---- hstr.pro | 4 ++-- test/hstr-unit-tests.pro | 2 +- test/resources/.bash_history_CZ | 2 +- ...ACE => .bash_history_bug_123_DEL_WITH_FINISHING_SPACE} | 0 .../{.bash_history_131_A => .bash_history_bug_124} | 0 ...=> .bash_history_bug_129_DELETE_ALL_AND_CRASH_BUG_129} | 0 .../{.bash_history_BUG_124 => .bash_history_bug_131_A} | 0 .../{.bash_history_131_B => .bash_history_bug_131_B} | 0 ...SH_131 => .bash_history_bug_131_ROTATE_VIEW_CRASH_131} | 0 .../{.bash_history_BUG_176 => .bash_history_bug_176} | 0 .../{.bash_history_BUG_228 => .bash_history_bug_228} | 0 ...bash_history_66_GERMAN => .bash_history_bug_66_GERMAN} | 0 test/src/test.c | 2 +- test/{test-bug124.sh => test-bug-124.sh} | 5 ++--- test/{test-bug163.sh => test-bug-163.sh} | 7 +++---- test/{test-bug175.sh => test-bug-175.sh} | 5 ++--- test/{test-bug176.sh => test-bug-176.sh} | 5 ++--- test/{test-bug228.sh => test-bug-228.sh} | 0 21 files changed, 21 insertions(+), 25 deletions(-) rename test/resources/{.bash_history_123_DEL_WITH_FINISHING_SPACE => .bash_history_bug_123_DEL_WITH_FINISHING_SPACE} (100%) rename test/resources/{.bash_history_131_A => .bash_history_bug_124} (100%) rename test/resources/{.bash_history_DELETE_ALL_AND_CRASH_BUG_129 => .bash_history_bug_129_DELETE_ALL_AND_CRASH_BUG_129} (100%) rename test/resources/{.bash_history_BUG_124 => .bash_history_bug_131_A} (100%) rename test/resources/{.bash_history_131_B => .bash_history_bug_131_B} (100%) rename test/resources/{.bash_history_ROTATE_VIEW_CRASH_131 => .bash_history_bug_131_ROTATE_VIEW_CRASH_131} (100%) rename test/resources/{.bash_history_BUG_176 => .bash_history_bug_176} (100%) rename test/resources/{.bash_history_BUG_228 => .bash_history_bug_228} (100%) rename test/resources/{.bash_history_66_GERMAN => .bash_history_bug_66_GERMAN} (100%) rename test/{test-bug124.sh => test-bug-124.sh} (89%) rename test/{test-bug163.sh => test-bug-163.sh} (82%) rename test/{test-bug175.sh => test-bug-175.sh} (89%) rename test/{test-bug176.sh => test-bug-176.sh} (88%) rename test/{test-bug228.sh => test-bug-228.sh} (100%) diff --git a/build/test-gdb.sh b/build/test-gdb.sh index 686a473..230c692 100755 --- a/build/test-gdb.sh +++ b/build/test-gdb.sh @@ -14,6 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -cd .. && make clean && qmake CONFIG+=hhdebug hh.pro && make && gdb ./hh +cd .. && make clean && qmake CONFIG+=hstrdebug hstr.pro && make && gdb ./hh # eof diff --git a/build/test-memleaks.sh b/build/test-memleaks.sh index 61d6e00..336f3d5 100755 --- a/build/test-memleaks.sh +++ b/build/test-memleaks.sh @@ -17,7 +17,7 @@ # Run HSTR w/ 1 history entry to hunt memleaks w/ valgrind # compile -cd .. && qmake CONFIG+=hhdebug hh.pro && make clean && make -j 8 +cd .. && qmake CONFIG+=hstrdebug hstr.pro && make clean && make -j 8 if [ ${?} -ne 0 ] then exit 1 @@ -28,7 +28,7 @@ fi export HISTFILE=`pwd`/test/resources/.bash_history_valgrind_1_entry # Valgrind -valgrind --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hh -n hist +valgrind --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hstr -n hist # Valgrind's GDB #valgrind --vgdb=yes --vgdb-error=0 --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hstr -n hist diff --git a/build/test-units.sh b/build/test-units.sh index 6e170d7..4cf5233 100755 --- a/build/test-units.sh +++ b/build/test-units.sh @@ -23,7 +23,7 @@ ./test-generate-unity-test-runner.sh # compile -cd ../test && qmake hh-unit-tests.pro && make clean && make -j 8 +cd ../test && qmake hstr-unit-tests.pro && make clean && make -j 8 if [ ${?} -ne 0 ] then exit 1 @@ -32,11 +32,11 @@ fi # run if [ ${OPTION_RUN_VALGRIND} ] then - valgrind --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hh-unit-tests + valgrind --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hstr-unit-tests # Valgrind's GDB - #valgrind --vgdb=yes --vgdb-error=0 --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hh-unit-tests + #valgrind --vgdb=yes --vgdb-error=0 --track-origins=yes --tool=memcheck --leak-check=full --show-leak-kinds=all ./hstr-unit-tests else - ./hh-unit-tests + ./hstr-unit-tests fi # eof diff --git a/hstr.pro b/hstr.pro index 84f570c..5ed2df3 100644 --- a/hstr.pro +++ b/hstr.pro @@ -1,4 +1,4 @@ -# hh.pro Qt project file for HSTR shell history compleation utility +# hstr.pro Qt project file for HSTR shell history compleation utility # # Copyright (C) 2014-2018 Martin Dvorak # @@ -17,7 +17,7 @@ ######################################################################### # # QMake build options: -# qmake CONFIG+=hhdebug ... add extra debug and profiling info +# qmake CONFIG+=hstrdebug ... add extra debug and profiling info # ######################################################################### diff --git a/test/hstr-unit-tests.pro b/test/hstr-unit-tests.pro index c1fccfc..13105a5 100644 --- a/test/hstr-unit-tests.pro +++ b/test/hstr-unit-tests.pro @@ -1,4 +1,4 @@ -# hh-unit-tests.pro Qt project file of UNIT tests for HSTR +# hstr-unit-tests.pro Qt project file of UNIT tests for HSTR # # Copyright (C) 2014-2018 Martin Dvorak # diff --git a/test/resources/.bash_history_CZ b/test/resources/.bash_history_CZ index 7243576..fee11ab 100644 --- a/test/resources/.bash_history_CZ +++ b/test/resources/.bash_history_CZ @@ -1,3 +1,3 @@ ěščřžýáíé ŘŠČŽ -./hh +./hstr diff --git a/test/resources/.bash_history_123_DEL_WITH_FINISHING_SPACE b/test/resources/.bash_history_bug_123_DEL_WITH_FINISHING_SPACE similarity index 100% rename from test/resources/.bash_history_123_DEL_WITH_FINISHING_SPACE rename to test/resources/.bash_history_bug_123_DEL_WITH_FINISHING_SPACE diff --git a/test/resources/.bash_history_131_A b/test/resources/.bash_history_bug_124 similarity index 100% rename from test/resources/.bash_history_131_A rename to test/resources/.bash_history_bug_124 diff --git a/test/resources/.bash_history_DELETE_ALL_AND_CRASH_BUG_129 b/test/resources/.bash_history_bug_129_DELETE_ALL_AND_CRASH_BUG_129 similarity index 100% rename from test/resources/.bash_history_DELETE_ALL_AND_CRASH_BUG_129 rename to test/resources/.bash_history_bug_129_DELETE_ALL_AND_CRASH_BUG_129 diff --git a/test/resources/.bash_history_BUG_124 b/test/resources/.bash_history_bug_131_A similarity index 100% rename from test/resources/.bash_history_BUG_124 rename to test/resources/.bash_history_bug_131_A diff --git a/test/resources/.bash_history_131_B b/test/resources/.bash_history_bug_131_B similarity index 100% rename from test/resources/.bash_history_131_B rename to test/resources/.bash_history_bug_131_B diff --git a/test/resources/.bash_history_ROTATE_VIEW_CRASH_131 b/test/resources/.bash_history_bug_131_ROTATE_VIEW_CRASH_131 similarity index 100% rename from test/resources/.bash_history_ROTATE_VIEW_CRASH_131 rename to test/resources/.bash_history_bug_131_ROTATE_VIEW_CRASH_131 diff --git a/test/resources/.bash_history_BUG_176 b/test/resources/.bash_history_bug_176 similarity index 100% rename from test/resources/.bash_history_BUG_176 rename to test/resources/.bash_history_bug_176 diff --git a/test/resources/.bash_history_BUG_228 b/test/resources/.bash_history_bug_228 similarity index 100% rename from test/resources/.bash_history_BUG_228 rename to test/resources/.bash_history_bug_228 diff --git a/test/resources/.bash_history_66_GERMAN b/test/resources/.bash_history_bug_66_GERMAN similarity index 100% rename from test/resources/.bash_history_66_GERMAN rename to test/resources/.bash_history_bug_66_GERMAN diff --git a/test/src/test.c b/test/src/test.c index 4fc5d7a..057634e 100644 --- a/test/src/test.c +++ b/test/src/test.c @@ -1,5 +1,5 @@ /* - main.c UNIT tests main for HSTR shell history completion utility + test.c UNIT tests main for HSTR shell history completion utility Copyright (C) 2014-2018 Martin Dvorak diff --git a/test/test-bug124.sh b/test/test-bug-124.sh similarity index 89% rename from test/test-bug124.sh rename to test/test-bug-124.sh index 1e9d156..aa2f306 100755 --- a/test/test-bug124.sh +++ b/test/test-bug-124.sh @@ -15,12 +15,11 @@ # limitations under the License. export HH_CONFIG=hicolor -export HISTFILE=/tmp/hh-bug-124 +export HISTFILE=/tmp/hstr-bug-124 -cp -vf ~/p/hstr/.bash_history_BUG_124 ${HISTFILE} +cp -vf ~/p/hstr/.bash_history_bug_124 ${HISTFILE} #cd ~/p/hstr/github/hstr/Debug && gdbserver :9999 ./hh #cd ~/p/hstr/github/hstr/Debug && ./hh -hh # eof diff --git a/test/test-bug163.sh b/test/test-bug-163.sh similarity index 82% rename from test/test-bug163.sh rename to test/test-bug-163.sh index 5e6953c..6e68de7 100755 --- a/test/test-bug163.sh +++ b/test/test-bug-163.sh @@ -17,10 +17,9 @@ export HH_CONFIG=hicolor,regexp export HISTFILE=/tmp/hh-bug-163 -cp -vf ~/p/hstr/.bash_history_BUG_163 ${HISTFILE} +cp -vf ~/p/hstr/.bash_history_bug_163 ${HISTFILE} -#cd ~/p/hstr/github/hstr/Debug && gdbserver :9999 ./hh -cd ~/p/hstr/github/hstr/Debug && ./hh -#hh +#cd ~/p/hstr/github/hstr && gdbserver :9999 ./hh +cd ~/p/hstr/github/hstr && ./hstr # eof diff --git a/test/test-bug175.sh b/test/test-bug-175.sh similarity index 89% rename from test/test-bug175.sh rename to test/test-bug-175.sh index 47f7606..31194a5 100755 --- a/test/test-bug175.sh +++ b/test/test-bug-175.sh @@ -18,9 +18,8 @@ infocmp | sed -e 's/[sr]mcup=[^,]*,//' > /tmp/noaltscreen-terminfo tic -o ~/.terminfo/ /tmp/noaltscreen-terminfo -#cd ~/p/hstr/github/hstr/Debug && gdbserver :9999 ./hh -#cd ~/p/hstr/github/hstr/Debug && ./hh -#hh +#cd ~/p/hstr/github/hstr && gdbserver :9999 ./hstr +#cd ~/p/hstr/github/hstr && ./hstr top # eof diff --git a/test/test-bug176.sh b/test/test-bug-176.sh similarity index 88% rename from test/test-bug176.sh rename to test/test-bug-176.sh index 9157dda..fd53ef9 100755 --- a/test/test-bug176.sh +++ b/test/test-bug-176.sh @@ -19,8 +19,7 @@ export HISTFILE=/tmp/hh-bug-176 cp -vf ~/p/hstr/github/hstr/tests/resources/.bash_history_BUG_176 ${HISTFILE} -#cd ~/p/hstr/github/hstr/Debug && gdbserver :9999 ./hh -#cd ~/p/hstr/github/hstr/Debug && ./hh -hh +#cd ~/p/hstr/github/hstr && gdbserver :9999 ./hstr +#cd ~/p/hstr/github/hstr && ./hstr # eof diff --git a/test/test-bug228.sh b/test/test-bug-228.sh similarity index 100% rename from test/test-bug228.sh rename to test/test-bug-228.sh