Diff

spec/util_jsonschema_spec.lua @ 13867:eabd38507c1d 13.0

util.jsonschema: Fix handling of `false` as schema Schemas can be either a boolean or a table (object) but since it only checked for truthiness, the case of `false` would be handled incorrectly. There seems to be no tests that cover `then` and `else` being `false`, only a couple that check the `if` keyword.
author Kim Alvefur <zash@zash.se>
date Sun, 30 Mar 2025 17:27:23 +0200
parent 13385:72d7830505f0
line wrap: on
line diff
--- a/spec/util_jsonschema_spec.lua	Fri Apr 18 12:25:06 2025 +0100
+++ b/spec/util_jsonschema_spec.lua	Sun Mar 30 17:27:23 2025 +0200
@@ -31,7 +31,10 @@
 	["patternProperties.json"] = "NYI",
 	["properties.json:1:2"] = "NYI",
 	["properties.json:1:3"] = "NYI",
+	["propertyNames.json:1:1"] = "NYI",
 	["ref.json:0:3"] = "util.jsonpointer recursive issue?",
+	["ref.json:3:2"] = "FIXME investigate, util.jsonpath issue?",
+	["ref.json:6:1"] = "NYI",
 	["ref.json:11"] = "NYI",
 	["ref.json:12:1"] = "FIXME",
 	["ref.json:13"] = "NYI",
@@ -41,28 +44,26 @@
 	["ref.json:17"] = "NYI",
 	["ref.json:18"] = "NYI",
 	["ref.json:19"] = "NYI",
+	["ref.json:20"] = "NYI",
+	["ref.json:25"] = "NYI",
 	["ref.json:26"] = "NYI",
 	["ref.json:27"] = "NYI",
 	["ref.json:28"] = "NYI",
-	["ref.json:3:2"] = "FIXME investigate, util.jsonpath issue?",
-	["required.json:4"] = "JavaScript specific and distinguishing objects from arrays",
-	["ref.json:6:1"] = "NYI",
-	["ref.json:20"] = "NYI",
-	["ref.json:25"] = "NYI",
 	["ref.json:29"] = "NYI",
 	["ref.json:30"] = "NYI",
 	["ref.json:31"] = "NYI",
 	["ref.json:32"] = "NYI",
 	["not.json:6"] = "NYI",
+	["required.json:0:2"] = "distinguishing objects from arrays",
+	["required.json:4"] = "JavaScript specific and distinguishing objects from arrays",
+	["not.json:8:0"] = "NYI",
 	["refRemote.json"] = "DEFINITELY NYI",
-	["required.json:0:2"] = "distinguishing objects from arrays",
 	["type.json:0:1"] = "1.0 is not an integer!",
 	["type.json:3:4"] = "distinguishing objects from arrays",
 	["type.json:3:6"] = "null is weird",
 	["type.json:4:3"] = "distinguishing objects from arrays",
 	["type.json:4:6"] = "null is weird",
 	["type.json:9:4"] = "null is weird",
-	["type.json:9:6"] = "null is weird",
 	["unevaluatedItems.json"] = "NYI",
 	["unevaluatedProperties.json"] = "NYI",
 	["uniqueItems.json:0:10"] = "deepcompare",