From b6ee35f9a4e0918a8fb9bc598d0075f86099c989 Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan@rename-it.nl>
Date: Mon, 13 Apr 2009 21:30:00 +0200
Subject: [PATCH] Testsuite: forgot to add new testcase file.

---
 tests/extensions/environment/rfc.svtest | 28 +++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 tests/extensions/environment/rfc.svtest

diff --git a/tests/extensions/environment/rfc.svtest b/tests/extensions/environment/rfc.svtest
new file mode 100644
index 000000000..7938765ff
--- /dev/null
+++ b/tests/extensions/environment/rfc.svtest
@@ -0,0 +1,28 @@
+require "vnd.dovecot.testsuite";
+require "environment";
+require "relational";
+
+test "Non-existant" {
+	if environment :contains "nonsense" "" {
+		test_fail "matched unknown environment item";	
+	}
+}
+
+test "Exists" {
+	if not environment :contains "version" "" {
+		test_fail "failed to match known environment item";
+	}
+}
+
+test "Count" {
+	if anyof (
+			environment :count "eq" "nonsense" "0",
+			environment :count "eq" "nonsense" "1"
+		) {
+		test_fail "count should not match unknown environment item";
+	}
+		
+	if not environment :count "eq" "host" "1" {
+		test_fail "count of non-empty environment should be 1";
+	}
+}
-- 
GitLab