summaryrefslogtreecommitdiffstats
path: root/test/test_cli.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_cli.sh')
-rw-r--r--test/test_cli.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/test_cli.sh b/test/test_cli.sh
new file mode 100644
index 0000000..be773f5
--- /dev/null
+++ b/test/test_cli.sh
@@ -0,0 +1,31 @@
+#! /bin/bash
+
+export TZ="UTC"
+export YES_COLOR=1
+
+run_cap_test ${lnav_test} -n -c 'foo'
+
+run_cap_test ${lnav_test} -d /tmp/lnav.err -t -n <<EOF
+Hello, World!
+Goodbye, World!
+EOF
+
+mkdir -p nested/sub1/sub2
+echo "2021-07-03T21:49:29 Test" > nested/sub1/sub2/test.log
+
+run_cap_test ${lnav_test} -nr nested
+
+printf "a\ba _\ba a\b_" | run_cap_test env TEST_COMMENT="overstrike bold" \
+ ${lnav_test} -n
+
+{
+ echo "This is the start of a file with long lines"
+ ${lnav_test} -nN \
+ -c ";select replicate('abcd', 2 * 1024 * 1024)" -c ':write-raw-to -'
+ echo "abcd"
+ echo "Goodbye"
+} > textfile_long_lines.0
+
+grep abcd textfile_long_lines.0 | run_cap_test \
+ ${lnav_test} -n -d /tmp/lnav.err \
+ -c ';SELECT filepath, lines FROM lnav_file'