diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-07 04:48:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-07 04:48:35 +0000 |
commit | 207df6fc406e81bfeebdff7f404bd242ff3f099f (patch) | |
tree | a1a796b056909dd0a04ffec163db9363a8757808 /test/test_text_file.sh | |
parent | Releasing progress-linux version 0.11.2-1~progress7.99u1. (diff) | |
download | lnav-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_text_file.sh')
-rw-r--r-- | test/test_text_file.sh | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/test/test_text_file.sh b/test/test_text_file.sh index 166f790..57ac32e 100644 --- a/test/test_text_file.sh +++ b/test/test_text_file.sh @@ -1,9 +1,15 @@ #! /bin/bash +export TZ=UTC export YES_COLOR=1 unset XDG_CONFIG_HOME run_cap_test ${lnav_test} -n \ + -c ':goto 5' \ + -c ':filter-out Lorem|sed' \ + ${test_dir}/textfile_plain.0 + +run_cap_test ${lnav_test} -n \ ${top_srcdir}/README.md run_cap_test ${lnav_test} -n -c ':goto #screenshot' \ @@ -34,3 +40,85 @@ run_cap_test ${lnav_test} -n \ run_cap_test ${lnav_test} -n \ ${test_dir}/textfile_ansi_expanding.0 + +run_cap_test ${lnav_test} -n \ + ${test_dir}/textfile_0.md + +run_cap_test ${lnav_test} -n \ + ${test_dir}/pyfile_0.py + +run_cap_test ${lnav_test} -n \ + ${test_dir}/man_echo.txt + +run_cap_test ${lnav_test} -n \ + -c ";SELECT top_meta FROM lnav_views WHERE name = 'text'" \ + -c ':write-json-to -' \ + ${test_dir}/man_echo.txt + +run_cap_test ${lnav_test} -n \ + -c ':goto 8' \ + -c ";SELECT top_meta FROM lnav_views WHERE name = 'text'" \ + -c ':write-json-to -' \ + < ${test_dir}/man_echo.txt + +run_cap_test ${lnav_test} -n \ + -c ':goto 6' \ + -c ";SELECT top_meta FROM lnav_views WHERE name = 'text'" \ + -c ':write-json-to -' \ + < ${test_dir}/example.toml + +run_cap_test ${lnav_test} -n \ + -c ':goto 9' \ + -c ";SELECT top_meta FROM lnav_views WHERE name = 'text'" \ + -c ':write-json-to -' \ + < ${test_dir}/example.patch + +run_cap_test ${lnav_test} -n \ + < ${top_srcdir}/autogen.sh + +run_cap_test ${lnav_test} -n \ + -c ';SELECT content FROM lnav_file' \ + ${test_dir}/textfile_nonl.txt + +run_cap_test ${lnav_test} -n \ + -c ':goto 23' \ + -c ';SELECT top_meta FROM lnav_top_view' \ + -c ':write-json-to -' \ + ${test_dir}/formats/jsontest/format.json + +run_cap_test ${lnav_test} -n \ + -c ':goto 3' \ + -c ':next-section' \ + ${test_dir}/books.json + +run_cap_test ${lnav_test} -n \ + -c ':goto 3' \ + -c ':next-section' \ + < ${test_dir}/books.json + +run_cap_test ${lnav_test} -n \ + -c ':goto #/catalog/1/title' \ + ${test_dir}/books.json + +run_cap_test ${lnav_test} -n \ + -c ':goto #/catalog/1/title' \ + < ${test_dir}/books.json + +echo "Hello, World!" | run_cap_test env TEST_COMMENT="piper crumbs" ${lnav_test} -n \ + -c ';SELECT top_meta FROM lnav_top_view' \ + -c ':write-json-to -' + +echo "Hello, World!" | run_cap_test \ + env TEST_COMMENT="piper crumbs" TZ=America/Los_Angeles \ + ${lnav_test} -n \ + -c ';SELECT top_meta FROM lnav_top_view' \ + -c ':write-json-to -' + +echo "Hello, World!" | run_cap_test \ + env TEST_COMMENT="piper crumbs" TZ=America/Los_Angeles \ + ${lnav_test} -nt + +${test_dir}/naughty_files.py +run_cap_test ${lnav_test} -n naughty/file-with-hidden-text.txt + +run_cap_test ${lnav_test} -n naughty/file-with-terminal-controls.txt |