Diff

spec/util_format_spec.lua @ 11644:fc1b8fe94d04

util.format: Change formatting of nil values to avoid looking like XML
author Kim Alvefur <zash@zash.se>
date Tue, 29 Jun 2021 16:18:31 +0200
parent 11638:5f4a657136bc
child 12031:87bc26f23d9b
line wrap: on
line diff
--- a/spec/util_format_spec.lua	Tue Jun 29 16:07:57 2021 +0200
+++ b/spec/util_format_spec.lua	Tue Jun 29 16:18:31 2021 +0200
@@ -4,10 +4,10 @@
 	describe("#format()", function()
 		it("should work", function()
 			assert.equal("hello", format("%s", "hello"));
-			assert.equal("<nil>", format("%s"));
-			assert.equal("<nil>", format("%d"));
-			assert.equal("<nil>", format("%q"));
-			assert.equal(" [<nil>]", format("", nil));
+			assert.equal("(nil)", format("%s"));
+			assert.equal("(nil)", format("%d"));
+			assert.equal("(nil)", format("%q"));
+			assert.equal(" [(nil)]", format("", nil));
 			assert.equal("true", format("%s", true));
 			assert.equal("[true]", format("%d", true));
 			assert.equal("% [true]", format("%%", true));