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