Commit 8d8064ff authored by Daniel Kochmański's avatar Daniel Kochmański

tests: enhance

Signed-off-by: 's avatarDaniel Kochmański <daniel@turtleware.eu>
parent b1f5f675
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
(deftest translate.nil-lang.1 (deftest translate.nil-lang.1
(apply #'values (apply #'values
(let ((translate:*language* nil)) (let ((translate:*language* nil))
(mapcar #'equal (mapcar #'(lambda (x y) (or (equal x y)
(list x y)))
(list #t"phrase-1" #t"phrase-2" #t"phrase-3") (list #t"phrase-1" #t"phrase-2" #t"phrase-3")
(list "phrase-1" "phrase-2" "phrase-3")))) (list "phrase-1" "phrase-2" "phrase-3"))))
T T T) T T T)
...@@ -17,23 +18,27 @@ ...@@ -17,23 +18,27 @@
(deftest translate.nil-lang.2 (deftest translate.nil-lang.2
(apply #'values (apply #'values
(let ((translate:*language* nil)) (let ((translate:*language* nil))
(mapcar #'equal (mapcar #'(lambda (x y) (and (equal x y)
(list x y)))
'(#t"phrase-1" #t"phrase-2" #t"phrase-3") '(#t"phrase-1" #t"phrase-2" #t"phrase-3")
'( "phrase-1" "phrase-2" "phrase-3")))) '( "phrase-1" "phrase-2" "phrase-3"))))
NIL NIL NIL) NIL NIL NIL)
(setf translate:*resolution-time* :load-time) (setf translate:*language* nil
translate:*resolution-time* :load-time)
(deftest translate.nil-lang.3 (deftest translate.nil-lang.3
(apply #'values (apply #'values
(mapcar #'equal (mapcar #'(lambda (x y) (or (equal x y)
(list x y)))
(list #t"phrase-1" #t"phrase-2" #t"phrase-3") (list #t"phrase-1" #t"phrase-2" #t"phrase-3")
(list "phrase-1" "phrase-2" "phrase-3"))) (list "phrase-1" "phrase-2" "phrase-3")))
T T T) T T T)
(deftest translate.nil-lang.4 (deftest translate.nil-lang.4
(apply #'values (apply #'values
(mapcar #'equal (mapcar #'(lambda (x y) (or (equal x y)
(list x y)))
'(#t"phrase-1" #t"phrase-2" #t"phrase-3") '(#t"phrase-1" #t"phrase-2" #t"phrase-3")
'( "phrase-1" "phrase-2" "phrase-3"))) '( "phrase-1" "phrase-2" "phrase-3")))
T T T) T T T)
...@@ -48,7 +53,8 @@ ...@@ -48,7 +53,8 @@
(deftest translate.en-lang.1 (deftest translate.en-lang.1
(apply #'values (apply #'values
(let ((translate:*language* 'en)) (let ((translate:*language* 'en))
(mapcar #'equal (mapcar #'(lambda (x y) (or (equal x y)
(list x y)))
(list #t"phrase-1" #t"phrase-2" #t"phrase-3") (list #t"phrase-1" #t"phrase-2" #t"phrase-3")
(list "Phrase one" "{phrase-2}" "{phrase-3}")))) (list "Phrase one" "{phrase-2}" "{phrase-3}"))))
T T T) T T T)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment