diff options
Diffstat (limited to '')
-rw-r--r-- | test/test_cmds.sh | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/test/test_cmds.sh b/test/test_cmds.sh index 5cb0a43..5103f79 100644 --- a/test/test_cmds.sh +++ b/test/test_cmds.sh @@ -1,6 +1,38 @@ #! /bin/bash +export TZ=UTC export YES_COLOR=1 +export DUMP_CRASH=1 + +run_cap_test ${lnav_test} -n \ + -c ":goto 0" \ + -c ":convert-time-to bad-zone" \ + ${test_dir}/logfile_access_log.0 + +run_cap_test ${lnav_test} -n \ + -c ":goto 0" \ + -c ":convert-time-to America/Los_Angeles" \ + ${test_dir}/logfile_access_log.0 + +run_cap_test ${lnav_test} -nN \ + -c ";SELECT ':echo Hello' || char(10) || ':echo World' AS cmds" \ + -c ':eval ${cmds}' + +run_cap_test ${lnav_test} -nN \ + -c ":cd /bad-dir" + +run_cap_test ${lnav_test} -nN \ + -c ":cd ${test_dir}/logfile_access_log.0" + +run_cap_test ${lnav_test} -nN \ + -c ":cd ${test_dir}" \ + -c ":open logfile_access_log.0" + +run_cap_test ${lnav_test} -nN \ + -e "echo Hello, World!" + +run_cap_test ${lnav_test} -nN \ + -e "echo Hello, World! > /dev/stderr" run_cap_test ${lnav_test} -n \ -c ":switch-to-view help" \ @@ -30,6 +62,10 @@ run_cap_test env TZ=UTC ${lnav_test} -n \ -c ":unix-time 1612072409" \ "${test_dir}/logfile_access_log.*" +#run_cap_test env TZ=UTC ${lnav_test} -n \ +# -c ":unix-time 16120724091612072409" \ +# "${test_dir}/logfile_access_log.*" + run_cap_test env TZ=UTC ${lnav_test} -n \ -c ":current-time" \ "${test_dir}/logfile_access_log.*" @@ -143,6 +179,10 @@ run_cap_test ${lnav_test} -n \ -c ":hide-fields access_log.c_ip access_log.cs_uri_stem" \ ${test_dir}/logfile_access_log.0 +run_cap_test ${lnav_test} -n \ + -c ':hide-fields log_time log_level' \ + ${test_dir}/logfile_generic.0 + run_cap_test ${lnav_test} -f- -n < ${test_dir}/formats/scripts/multiline-echo.lnav run_cap_test ${lnav_test} -n \ @@ -375,6 +415,12 @@ run_cap_test ${lnav_test} -n \ ${test_dir}/logfile_access_log.0 run_cap_test ${lnav_test} -n \ + -I ${test_dir} \ + -c ":goto 5" \ + -c ":pipe-line-to echo \$log_raw_text \$log_level \$user" \ + ${test_dir}/logfile_json.json + +run_cap_test ${lnav_test} -n \ -c ":switch-to-view pretty" \ ${test_dir}/textfile_json_one_line.0 |