2015-08-20 04:02:26 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
2015-08-20 04:15:34 +00:00
|
|
|
export TZ="UTC"
|
2022-04-30 20:05:42 +00:00
|
|
|
export YES_COLOR=1
|
2022-04-12 23:07:13 +00:00
|
|
|
|
2022-04-30 20:05:42 +00:00
|
|
|
run_cap_test ${lnav_test} -n -c 'foo'
|
2022-04-12 23:07:13 +00:00
|
|
|
|
2023-07-07 03:05:30 +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
|
|
|
|
|
2021-07-04 04:57:50 +00:00
|
|
|
mkdir -p nested/sub1/sub2
|
|
|
|
echo "2021-07-03T21:49:29 Test" > nested/sub1/sub2/test.log
|
|
|
|
|
2022-04-30 20:05:42 +00:00
|
|
|
run_cap_test ${lnav_test} -nr nested
|
2022-08-09 06:14:02 +00:00
|
|
|
|
|
|
|
printf "a\ba _\ba a\b_" | run_cap_test env TEST_COMMENT="overstrike bold" \
|
|
|
|
${lnav_test} -n
|
2022-09-04 13:38:39 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
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'
|
2023-07-07 03:05:30 +00:00
|
|
|
|
|
|
|
export HOME="./piper-config"
|
|
|
|
rm -rf ./piper-config
|
2023-07-16 06:16:02 +00:00
|
|
|
mkdir -p $HOME/.lnav
|
2023-07-07 03:05:30 +00:00
|
|
|
|
|
|
|
${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
|
2023-07-16 04:50:46 +00:00
|
|
|
|
|
|
|
export HOME="./mgmt-config"
|
|
|
|
rm -rf ./mgmt-config
|
2023-07-16 12:26:16 +00:00
|
|
|
mkdir -p $HOME/.lnav
|
2023-07-16 04:50:46 +00:00
|
|
|
run_cap_test ${lnav_test} -m -I ${test_dir} config get
|
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -m -I ${test_dir} config blame
|
2023-07-19 05:14:45 +00:00
|
|
|
|
|
|
|
export TMPDIR="piper-tmp"
|
|
|
|
rm -rf ./piper-tmp
|
2024-05-22 06:45:48 +00:00
|
|
|
mkdir piper-tmp
|
2023-07-19 05:14:45 +00:00
|
|
|
run_cap_test ${lnav_test} -n -e 'echo hi'
|
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -m piper list
|
|
|
|
|
2024-04-04 17:13:59 +00:00
|
|
|
PIPER_URL=$(env NO_COLOR=1 ${lnav_test} -m -q piper list | tail -1 | sed -r -e 's;.*(piper://[^ ]+).*;\1;g')
|
2023-07-19 05:14:45 +00:00
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n $PIPER_URL
|
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n $PIPER_URL \
|
|
|
|
-c ";SELECT filepath, descriptor, mimetype, jget(content, '/ctime') as ctime, jget(content, '/cwd') as cwd FROM lnav_file_metadata" \
|
|
|
|
-c ':write-json-to -'
|