diff options
-rw-r--r-- | test-suite/tests/tree-il.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test index 8ea244343..1b86b99fc 100644 --- a/test-suite/tests/tree-il.test +++ b/test-suite/tests/tree-il.test @@ -1153,6 +1153,13 @@ (number? (string-contains (car w) "non-literal format string"))))) + (pass-if "non-literal format string using gettext" + (null? (call-with-warnings + (lambda () + (compile '(format #t (_ "~A ~A!") "hello" "world") + #:opts %opts-w-format + #:to 'assembly))))) + (pass-if "wrong format string" (let ((w (call-with-warnings (lambda () @@ -1190,6 +1197,16 @@ (number? (string-contains (car w) "expected 1, got 0"))))) + (pass-if "one missing argument, gettext" + (let ((w (call-with-warnings + (lambda () + (compile '(format some-port (_ "foo ~A~%")) + #:opts %opts-w-format + #:to 'assembly))))) + (and (= (length w) 1) + (number? (string-contains (car w) + "expected 1, got 0"))))) + (pass-if "two missing arguments" (let ((w (call-with-warnings (lambda () |