From 5aac71850ec2757d83eb5ee9213ed371eacfd88d Mon Sep 17 00:00:00 2001 From: shuhei Date: Sun, 22 Apr 2001 11:57:57 +0000 Subject: [PATCH] (test-rfc2231-10, test-rfc2231-11, test-rfc2231-12): New testcases for language info. --- tests/test-rfc2231.el | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/test-rfc2231.el b/tests/test-rfc2231.el index 48d91ef..ab6c9c8 100644 --- a/tests/test-rfc2231.el +++ b/tests/test-rfc2231.el @@ -108,3 +108,37 @@ 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"))))) -- 1.7.10.4