lnav/test/test_cli.sh

41 lines
980 B
Bash
Raw Normal View History

2015-08-20 04:02:26 +00:00
#! /bin/bash
2015-08-20 04:15:34 +00:00
export TZ="UTC"
export YES_COLOR=1
2022-04-12 23:07:13 +00:00
run_cap_test ${lnav_test} -n -c 'foo'
2022-04-12 23:07:13 +00:00
run_cap_test ${lnav_test} -d /tmp/lnav.err -n <<EOF
2015-08-20 04:02:26 +00:00
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'
export HOME="./piper-config"
rm -rf ./piper-config
mkdir -p $HOME/.config
${lnav_test} -Nn -c ':config /tuning/piper/max-size 128'
cat ${test_dir}/logfile_haproxy.0 | run_cap_test \
env TEST_COMMENT="stdin rotation" ${lnav_test} -n