summaryrefslogtreecommitdiffstats
path: root/test/test_format_installer.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 04:48:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-07 04:48:35 +0000
commit207df6fc406e81bfeebdff7f404bd242ff3f099f (patch)
treea1a796b056909dd0a04ffec163db9363a8757808 /test/test_format_installer.sh
parentReleasing progress-linux version 0.11.2-1~progress7.99u1. (diff)
downloadlnav-207df6fc406e81bfeebdff7f404bd242ff3f099f.tar.xz
lnav-207df6fc406e81bfeebdff7f404bd242ff3f099f.zip
Merging upstream version 0.12.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/test_format_installer.sh')
-rw-r--r--test/test_format_installer.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_format_installer.sh b/test/test_format_installer.sh
index 2b94d3d..764f879 100644
--- a/test/test_format_installer.sh
+++ b/test/test_format_installer.sh
@@ -8,6 +8,7 @@ rm -rf "${CONFIG_DIR}/.lnav/formats"
HOME=${CONFIG_DIR}
unset XDG_CONFIG_HOME
export HOME
+export YES_COLOR=1
${lnav_test} -i ${srcdir}/formats/jsontest/format.json
@@ -16,6 +17,19 @@ if ! test -f ${CONFIG_DIR}/.lnav/formats/installed/test_log.json; then
exit 1
fi
+run_cap_test ${lnav_test} -i ${srcdir}/formats/jsontest/format.json
+
+echo corrupt > ${CONFIG_DIR}/.lnav/formats/installed/test_log.json
+
+run_cap_test env TEST_COMMENT='overwrite file' ${lnav_test} -i ${srcdir}/formats/jsontest/format.json
+
+if ! test -f ${CONFIG_DIR}/.lnav/formats/installed/test_log.json.bak; then
+ echo "Format not backed up correctly?"
+ exit 1
+fi
+
+run_cap_test ${lnav_test} -i /non-existent/file
+
if test x"${TEST_GIT_INSTALL}" = x""; then
# Hitting the git repos frequently is slow/noisy
exit 0