diff options
author | Omar Polo <op@omarpolo.com> | 2024-06-06 17:38:30 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2024-06-06 17:38:30 +0000 |
commit | 235f5e70ee3c6fc3e78f9d526b7e99f4d6e502cf (patch) | |
tree | d7676b336af8ffb0837bb0cc73490f26dca2d790 /regress | |
parent | 471cae7e8f4ff67774283b7379a4a82e81ffe077 (diff) |
regress: add a test for comments and blanks at the start of the file
Diffstat (limited to 'regress')
-rwxr-xr-x | regress/regress | 3 | ||||
-rw-r--r-- | regress/tests.sh | 17 |
2 files changed, 19 insertions, 1 deletions
diff --git a/regress/regress b/regress/regress index 516a78b..47ef460 100755 --- a/regress/regress +++ b/regress/regress @@ -20,7 +20,8 @@ fi run_test test_punycode run_test test_iri -# Run configuration dumping test. +# Run configuration parsing tests. +run_test test_parse_comments_at_start run_test test_dump_config if [ "${SKIP_RUNTIME_TESTS:-0}" -eq 1 ]; then diff --git a/regress/tests.sh b/regress/tests.sh index 58711a3..b9f934b 100644 --- a/regress/tests.sh +++ b/regress/tests.sh @@ -8,6 +8,23 @@ test_iri() { ./iri_test } +test_parse_comments_at_start() { + dont_check_server_alive=yes + + cat <<EOF >reg.conf +# a comment + +server "$server_name" { + cert "$PWD/localhost.pem" + key "$PWD/localhost.key" + root "$PWD/testdata" + listen on $host port $port +} +EOF + + $gmid -n -c reg.conf >/dev/null +} + test_dump_config() { dont_check_server_alive=yes gen_config '' '' |