stanzacmp tests: Fix some [luacheck] warnings

Thu, 06 Sep 2018 18:28:27 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 06 Sep 2018 18:28:27 +0100
changeset 100
f2b3e8e6690f
parent 99
dc56d434e406
child 101
91a9e557e0e5

stanzacmp tests: Fix some [luacheck] warnings

spec/stanzacmp_spec.lua file | annotate | diff | comparison | revisions
--- a/spec/stanzacmp_spec.lua	Thu Sep 06 18:26:01 2018 +0100
+++ b/spec/stanzacmp_spec.lua	Thu Sep 06 18:28:27 2018 +0100
@@ -1,5 +1,6 @@
+--luacheck: std +busted
 local stanzacmp = require "scansion.stanzacmp";
-local verse = require "verse";
+require "verse";
 local st = require "util.stanza";
 local xml = require "scansion.xml";
 
@@ -40,27 +41,27 @@
 	it("should work", function ()
 		local s1 = st.message({ to = "foo", from = "bar"});
 		local s2 = st.message({ to = "foo", from = "bar"});
-		
+
 		yes(s1, s2);
 		yes(s2, s1);
-		
+
 		s1.attr.to = nil;
-		
+
 		yes(s1, s2);
 		no(s2, s1);
-		
+
 		s1.attr.to = "foo";
 		yes(s1, s2);
-		
+
 		s2:tag("blah", { xmlns = "foobar" });
-		
+
 		yes(s1, s2);
 		no(s2, s1);
-		
+
 		s1:tag("blah", { xmlns = "foobar" });
 		yes(s1, s2);
 		yes(s2, s1);
-		
+
 		s1:tag("a");
 		no(s1, s2);
 		s2:tag("a");
@@ -81,32 +82,32 @@
 	it("should allow matching any attribute value with {scansion:any}", function ()
 		--[[
 		<message from="user@localhost/71652fc8-93cb-40c7-8220-47ce80cc417b" type="chat">
-  		<body>Hello Juliet, are you there?</body>
-  		<delay xmlns="urn:xmpp:delay" from="localhost"/>
+		<body>Hello Juliet, are you there?</body>
+		<delay xmlns="urn:xmpp:delay" from="localhost"/>
 		</message>
 		]]
-		
+
 		local s01 = st.message({ from = "user@localhost/71652fc8-93cb-40c7-8220-47ce80cc417b", type = "chat" })
 			:tag("body"):text("Hello Juliet, are you there?"):up()
 			:tag("delay", { xmlns = "urn:xmpp:delay", from = "localhost", stamp = "{scansion:any}" }):up();
-		
+
 		--[[
 		<message to="juliet@localhost" type="chat" from="user@localhost/71652fc8-93cb-40c7-8220-47ce80cc417b">
-  		<body>Hello Juliet, are you there?</body>
-  		<stanza-id xmlns="urn:xmpp:sid:0" by="user@localhost" id="eb9eaf13-384e-47d1-a6c0-303ef4f1ac70"/>
-  		<stanza-id xmlns="urn:xmpp:sid:0" by="juliet@localhost" id="f6c6f61d-0b15-46d6-9f69-bca1640401d1"/>
-  		<delay xmlns="urn:xmpp:delay" stamp="2017-05-07T09:46:21Z" from="localhost"/>
+		<body>Hello Juliet, are you there?</body>
+		<stanza-id xmlns="urn:xmpp:sid:0" by="user@localhost" id="eb9eaf13-384e-47d1-a6c0-303ef4f1ac70"/>
+		<stanza-id xmlns="urn:xmpp:sid:0" by="juliet@localhost" id="f6c6f61d-0b15-46d6-9f69-bca1640401d1"/>
+		<delay xmlns="urn:xmpp:delay" stamp="2017-05-07T09:46:21Z" from="localhost"/>
 		</message>
 		]]
-		
+
 		local s02 = st.message({ to = "juliet@localhost", from = "user@localhost/71652fc8-93cb-40c7-8220-47ce80cc417b", type = "chat" })
 			:tag("body"):text("Hello Juliet, are you there?"):up()
 			:tag("stanza-id", { xmlns = "urn:xmpp:sid:0", by = "user@localhost", id = "eb9eaf13-384e-47d1-a6c0-303ef4f1ac70" }):up()
 			:tag("stanza-id", { xmlns = "urn:xmpp:sid:0", by = "juliet@localhost", id = "f6c6f61d-0b15-46d6-9f69-bca1640401d1" }):up()
 			:tag("delay", { xmlns = "urn:xmpp:delay", stamp = "2017-05-07T09:46:21Z", from = "localhost" }):up();
-		
-		
-		
+
+
+
 		yes(s01, s02);
 	end);
 

mercurial