* test-wl-address.el: New file.
authorkaoru <kaoru>
Mon, 30 May 2011 07:50:54 +0000 (07:50 +0000)
committerkaoru <kaoru>
Mon, 30 May 2011 07:50:54 +0000 (07:50 +0000)
tests/ChangeLog
tests/test-wl-address.el [new file with mode: 0644]

index ef13f97..1919168 100644 (file)
@@ -1,3 +1,7 @@
+2011-05-30  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * test-wl-address.el: New file.
+
 2011-04-07  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * test-elmo-date.el: Add `lexical-binding' file variable.
diff --git a/tests/test-wl-address.el b/tests/test-wl-address.el
new file mode 100644 (file)
index 0000000..1e2418f
--- /dev/null
@@ -0,0 +1,19 @@
+;; -*- lexical-binding: t -*-
+(require 'lunit)
+(require 'wl-address)
+
+(luna-define-class test-wl-address (lunit-test-case))
+
+(luna-define-method test-wl-address-header-extract-address-1 ((case test-wl-address))
+  (lunit-assert
+   (string=
+    "m-sakura@example.org"
+    (wl-address-header-extract-address "Mine Sakurai <m-sakura@example.org>")
+    )))
+
+(luna-define-method test-wl-address-header-extract-address-2 ((case test-wl-address))
+  (lunit-assert
+   (string=
+    "m-sakura@example.org"
+    (wl-address-header-extract-address "m-sakura@example.org (Mine Sakurai)")
+    )))