summaryrefslogtreecommitdiffstats
path: root/test/test_text_file.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:55 +0000
commit5068d34c08f951a7ea6257d305a1627b09a95817 (patch)
tree08213e2be853396a3b07ce15dbe222644dcd9a89 /test/test_text_file.sh
parentInitial commit. (diff)
downloadlnav-5068d34c08f951a7ea6257d305a1627b09a95817.tar.xz
lnav-5068d34c08f951a7ea6257d305a1627b09a95817.zip
Adding upstream version 0.11.1.upstream/0.11.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/test_text_file.sh')
-rw-r--r--test/test_text_file.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/test_text_file.sh b/test/test_text_file.sh
new file mode 100644
index 0000000..9f326a9
--- /dev/null
+++ b/test/test_text_file.sh
@@ -0,0 +1,33 @@
+#! /bin/bash
+
+export YES_COLOR=1
+unset XDG_CONFIG_HOME
+
+run_cap_test ${lnav_test} -n \
+ ${top_srcdir}/README.md
+
+run_cap_test ${lnav_test} -n -c ':goto #screenshot' \
+ ${top_srcdir}/README.md
+
+run_cap_test ${lnav_test} -n ${top_srcdir}/README.md#screenshot
+
+# run_cap_test ${lnav_test} -n ${test_dir}/non-existent:4
+
+run_cap_test ${lnav_test} -n ${top_srcdir}/README.md:-4
+
+run_cap_test ${lnav_test} -n \
+ -c ':goto 115' \
+ -c ";SELECT top_meta FROM lnav_views WHERE name = 'text'" \
+ -c ':write-json-to -' \
+ ${top_srcdir}/README.md
+
+run_cap_test ${lnav_test} -n \
+ ${top_srcdir}/src/log_level.cc
+
+cp ${test_dir}/UTF-8-test.txt UTF-8-test.md
+run_cap_test ${lnav_test} -n \
+ UTF-8-test.md
+
+run_cap_test ${lnav_test} -n \
+ -c ';SELECT * FROM lnav_file_metadata' \
+ ${test_dir}/textfile_0.md