diff --git a/TODO b/TODO
index 20c6231d4426bc5ead0421d8ba64822b3ab307ca..b85c8c438a59a0f43c1dccabcac00a6660451c35 100644
--- a/TODO
+++ b/TODO
@@ -16,6 +16,7 @@ Next (in order of descending priority/precedence):
 	  nesting.
 	- Limit the maximum number of included scripts
 	- Make (configurable) limit on the number of redirects
+	- Implement limits recommended by the variables RFC (5229)
 	- Malicious/Broken binary can allocate large variable storage
 * Finish the test suite for the base functionality
 * Make sure cmusieve can be replaced seamlessly with the new plugin.
diff --git a/tests/extensions/variables/errors.svtest b/tests/extensions/variables/errors.svtest
index afc130d44bc1502000d2c3f89fb996201e09743e..bd1e3ada6293f1c4677e5c5057f0eddc7d9e883c 100644
--- a/tests/extensions/variables/errors.svtest
+++ b/tests/extensions/variables/errors.svtest
@@ -18,7 +18,7 @@ test "Invalid set command invocations (FIXME: count only)" {
 		test_fail "compile should have failed";
 	}
 
-	if not test_error :count "eq" :comparator "i;ascii-numeric" "6" {
+	if not test_error :count "eq" :comparator "i;ascii-numeric" "7" {
 		test_fail "wrong number of errors reported";
 	}
 }
diff --git a/tests/extensions/variables/errors/set.sieve b/tests/extensions/variables/errors/set.sieve
index f3cb5fd469187d6bb3064e36d481db24295fab46..07c393a5769e53b3287356ebb62219d043025498 100644
--- a/tests/extensions/variables/errors/set.sieve
+++ b/tests/extensions/variables/errors/set.sieve
@@ -14,3 +14,6 @@ set "0" "frop";
 
 # Not an error
 set :UPPER "name" "frop";
+
+# Invalid tag
+set :inner "name" "frop";
diff --git a/tests/extensions/variables/string.svtest b/tests/extensions/variables/string.svtest
index a2d4aa6ec12bce52ab835f7241f1c77faa364ee9..13a99812848739e46b2447e7d18ff7d770c6195f 100644
--- a/tests/extensions/variables/string.svtest
+++ b/tests/extensions/variables/string.svtest
@@ -26,3 +26,12 @@ test "RFC example" {
 		test_fail "test should have matched: \" ${state} \"";
 	}
 }
+
+test "No whitespace stripping" {
+	set "vara" "      value       ";
+	set "varb" "value";
+
+	if not string :is :comparator "i;octet" "${vara}" "      ${varb}       " {
+		test_fail "string test seems to have stripped white space";
+	}
+}