+
+
+def test_relative_log_file(project_env, monkeypatch, test_script, run_website_script):
+ monkeypatch.setenv('NOMINATIM_LOG_FILE', 'access.log')
+
+ expected_file = str(project_env.project_dir / 'access.log')
+ test_script(f'exit(CONST_Log_File === "{expected_file}" ? 10 : 20);')
+
+ assert run_website_script() == 10
+
+def test_variable_with_bracket(project_env, monkeypatch, test_script, run_website_script):
+ monkeypatch.setenv('NOMINATIM_DATABASE_DSN', 'pgsql:dbname=nominatim;user=foo;password=4{5')
+
+ test_script('exit(CONST_Database_DSN === "pgsql:dbname=nominatim;user=foo;password=4{5" ? 10 : 20);')
+
+ assert run_website_script() == 10
+