ソースを参照

Squashed 'tests/json-patch-tests/' changes from 5405313..0dd0fbc

0dd0fbc tests.json: Test case sensitivity
01348ad tests.json: Remove trailing whitespace

git-subtree-dir: tests/json-patch-tests
git-subtree-split: 0dd0fbc5ec7eb9dab362fab47e08419079d5675e
Max Bruckner 8 年 前
コミット
ffb877c94a
1 ファイル変更8 行追加2 行削除
  1. 8 2
      tests.json

+ 8 - 2
tests.json

@@ -409,7 +409,7 @@
       "doc": ["foo", "bar"],
       "patch": [{"op": "test", "path": "/01", "value": "bar"}],
       "error": "test op should reject the array value, it has leading zeros" },
-    
+
     { "comment": "Removing nonexistent field",
       "doc": {"foo" : "bar"},
       "patch": [{"op": "remove", "path": "/baz"}],
@@ -418,6 +418,12 @@
     { "comment": "Removing nonexistent index",
       "doc": ["foo", "bar"],
       "patch": [{"op": "remove", "path": "/2"}],
-      "error": "removing a nonexistent index should fail" }
+      "error": "removing a nonexistent index should fail" },
+
+    { "comment": "Patch with different capitalisation than doc",
+       "doc": {"foo":"bar"},
+       "patch": [{"op": "add", "path": "/FOO", "value": "BAR"}],
+       "expected": {"foo": "bar", "FOO": "BAR"}
+    }
 
 ]