2019-05-03 22:50:19 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
export YES_COLOR=1
|
|
|
|
|
2019-08-07 18:46:19 +02:00
|
|
|
export HOME="./test-config"
|
2021-08-29 16:35:55 +02:00
|
|
|
export XDG_CONFIG_HOME="./test-config/.config"
|
2019-08-07 18:46:19 +02:00
|
|
|
rm -rf ./test-config
|
|
|
|
mkdir -p $HOME/.config
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# config write global var
|
|
|
|
run_cap_test ${lnav_test} -nN \
|
2021-05-20 07:05:21 +02:00
|
|
|
-c ":config /global/foo bar"
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# config read global var
|
|
|
|
run_cap_test ${lnav_test} -nN \
|
2021-05-20 07:05:21 +02:00
|
|
|
-c ":config /global/foo"
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# config bad color
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2019-05-03 22:50:19 +02:00
|
|
|
-c ":config /ui/theme-defs/default/styles/text/color #f" \
|
|
|
|
${test_dir}/logfile_access_log.0
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# invalid min-free-space allowed?
|
|
|
|
run_cap_test env TMPDIR=tmp ${lnav_test} -n \
|
2021-02-01 07:43:19 +01:00
|
|
|
-c ':config /tuning/archive-manager/min-free-space abc' \
|
|
|
|
${srcdir}/logfile_syslog.0
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# config bad theme
|
|
|
|
run_cap_test ${lnav_test} -n \
|
2019-05-03 22:50:19 +02:00
|
|
|
-c ":config /ui/theme baddy" \
|
|
|
|
${test_dir}/logfile_access_log.0
|
|
|
|
|
2022-04-30 22:05:42 +02:00
|
|
|
# config bad theme
|
2022-09-12 16:18:26 +02:00
|
|
|
run_cap_test ${lnav_test} -W -n \
|
2019-05-03 22:50:19 +02:00
|
|
|
-I ${test_dir}/bad-config2 \
|
|
|
|
${test_dir}/logfile_access_log.0
|
2022-06-29 07:23:56 +02:00
|
|
|
|
|
|
|
run_cap_test ${lnav_test} -nN \
|
|
|
|
-c ":reset-config /bad/path"
|