2016-03-06 23:58:37 -08:00
|
|
|
#! /bin/bash
|
|
|
|
|
|
2025-02-04 15:56:07 -08:00
|
|
|
export TZ=UTC
|
|
|
|
|
export YES_COLOR=1
|
|
|
|
|
export DUMP_CRASH=1
|
2016-03-06 23:58:37 -08:00
|
|
|
|
|
|
|
|
touch scripts-empty
|
|
|
|
|
|
|
|
|
|
run_test ${lnav_test} -n -d /tmp/lnav.err \
|
|
|
|
|
-I ${test_dir} \
|
|
|
|
|
-f 'multiline-echo' \
|
|
|
|
|
scripts-empty
|
|
|
|
|
|
|
|
|
|
check_error_output "multiline-echo has errors?" <<EOF
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
check_output "multiline-echo is not working?" <<EOF
|
|
|
|
|
Hello, World!
|
|
|
|
|
Goodbye, World!
|
|
|
|
|
EOF
|
2018-10-12 07:12:35 -07:00
|
|
|
|
|
|
|
|
run_test ${lnav_test} -n -d /tmp/lnav.err \
|
|
|
|
|
-I ${test_dir} \
|
|
|
|
|
-f 'redirecting' \
|
|
|
|
|
scripts-empty
|
|
|
|
|
|
|
|
|
|
check_error_output "redirecting has errors?" <<EOF
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
check_output "redirecting is not working?" <<EOF
|
|
|
|
|
Howdy!
|
|
|
|
|
Goodbye, World!
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
diff -w -u - hw.txt <<EOF
|
|
|
|
|
Hello, World!
|
|
|
|
|
HOWDY!
|
|
|
|
|
GOODBYE, WORLD!
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
if test $? -ne 0; then
|
|
|
|
|
echo "Script output was not redirected?"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
diff -w -u - hw2.txt <<EOF
|
|
|
|
|
HELLO, WORLD!
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
if test $? -ne 0; then
|
|
|
|
|
echo "Script output was not redirected?"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
2025-02-04 15:04:00 -08:00
|
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -n \
|
|
|
|
|
-c '|report-access-log' \
|
|
|
|
|
${test_dir}/logfile_shop_access_log.0
|