summaryrefslogtreecommitdiff
path: root/test/behaviour/settings.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/behaviour/settings.zig')
-rw-r--r--test/behaviour/settings.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/behaviour/settings.zig b/test/behaviour/settings.zig
index ff24704a..b850a532 100644
--- a/test/behaviour/settings.zig
+++ b/test/behaviour/settings.zig
@@ -101,3 +101,14 @@ test "settings: Config without a configuration directory says so and opens nothi
try s.expect("/index", index);
try expectHas(try s.read("/log"), "Config: no startup file here: no configuration directory");
}
+
+test "settings: a bad setting value is quoted, so two different bad values log as two records, never one counted twice" {
+ var s = try Session.initFile(std.testing.allocator, "x\n");
+ defer s.deinit();
+ _ = try s.refused("/ctl", "Verbose maybe\n");
+ _ = try s.refused("/ctl", "Verbose nope\n");
+ const log = try s.read("/log");
+ try std.testing.expect(has(log, "takes on, off \"maybe\"\n"));
+ try std.testing.expect(has(log, "takes on, off \"nope\"\n"));
+ try std.testing.expect(!has(log, "(x2)"));
+}