(test-rfc2231-10, test-rfc2231-11, test-rfc2231-12): New testcases for language info.
authorshuhei <shuhei>
Sun, 22 Apr 2001 11:57:57 +0000 (11:57 +0000)
committershuhei <shuhei>
Sun, 22 Apr 2001 11:57:57 +0000 (11:57 +0000)
tests/test-rfc2231.el

index 48d91ef..ab6c9c8 100644 (file)
  title*2=\"isn%27t%20it!\"")
      "title")
     "This is even more ***fun*** isn%27t%20it!")))
+
+;;; both flim-1_13-rfc2231 and flim-1_14-rfc2231 choose to put language
+;;; info to the `mime-language' text-property of the parameter value.
+(luna-define-method test-rfc2231-10 ((case test-rfc2231))
+  (lunit-assert
+   (string=
+    (get-text-property
+     0 'mime-language
+     (mime-content-type-parameter
+      (mime-parse-Content-Type "application/x-stuff;
+ title*=us-ascii'en-us'This%20is%20%2A%2A%2Afun%2A%2A%2A")
+      "title"))
+    "en-us")))
+
+(luna-define-method test-rfc2231-11 ((case test-rfc2231))
+  (lunit-assert
+   (string=
+    (get-text-property
+     0 'mime-language
+     (mime-content-type-parameter
+      (mime-parse-Content-Type "application/x-stuff;
+ title*=US-ASCII'EN-US'This%20is%20%2A%2A%2Afun%2A%2A%2A")
+      "title"))
+    "en-us")))
+
+(luna-define-method test-rfc2231-12 ((case test-rfc2231))
+  (lunit-assert
+   (null
+    (get-text-property
+     0 'mime-language
+     (mime-content-type-parameter
+      (mime-parse-Content-Type "application/x-stuff;
+ title*=us-ascii''This%20is%20%2A%2A%2Afun%2A%2A%2A")
+      "title")))))