spec/stanzacmp_spec.lua

changeset 99
dc56d434e406
parent 98
88a3e03f4b9f
child 100
f2b3e8e6690f
--- a/spec/stanzacmp_spec.lua	Thu Sep 06 18:23:56 2018 +0100
+++ b/spec/stanzacmp_spec.lua	Thu Sep 06 18:26:01 2018 +0100
@@ -109,4 +109,16 @@
 		
 		yes(s01, s02);
 	end);
+
+	it("should match unordered children at the top level", function ()
+		yes("<foo><one/><two/></foo>", "<foo><two/><one/></foo>");
+	end);
+
+	it("should not match unordered children", function ()
+		no("<foo><one><a/><b/></one></foo>", "<foo><one><b/><a/></one></foo>");
+	end);
+
+	it("should be possible to disable ordered matching", function ()
+		yes("<foo><one scansion:strict='no'><a/><b/></one></foo>", "<foo><one><b/><a/></one></foo>");
+	end);
 end);

mercurial