Fix value for createLink
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Fri, 29 Jul 2011 15:08:40 -0600
changeset 475 c9ad44506915
parent 474 f1f490ebd50f
child 476 78f24fe9ebbf
Fix value for createLink

These implementation bugs are all due to the fact that I didn't
previously flag bad-result spans as an alert, so I didn't notice how
many were wrong . . .
tests.js
--- a/tests.js	Fri Jul 29 15:05:28 2011 -0600
+++ b/tests.js	Fri Jul 29 15:08:40 2011 -0600
@@ -3764,7 +3764,12 @@
 		value = null;
 	}
 
-	if (/^justify(center|full|left|right)$/.test(command)) {
+	if (command == "createlink" && value === "") {
+		// It should just do nothing.
+		afterDiv.lastChild.className = beforeValue === afterValue
+			? "good-result"
+			: "bad-result";
+	} else if (/^justify(center|full|left|right)$/.test(command)) {
 		// We know there are only four correct values beforehand, and afterward
 		// the value has to be the one we set.
 		if (!/^(center|justify|left|right)$/.test(beforeValue)) {