diff options
author | Andy Wingo <wingo@pobox.com> | 2012-05-21 19:20:27 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2012-05-21 19:20:27 +0200 |
commit | 74bbb99457c661a98fbdde0c0504da1b3a053fc3 (patch) | |
tree | 654f0a4cf3d4f8441d2b2638f4d8af7adde24846 /test-suite/tests/tree-il.test | |
parent | 730af462c387ce9cca30e84b8963edba10399d2e (diff) | |
parent | 15bb587f45b718f08756993fec9274212cc7df58 (diff) | |
download | guile-74bbb99457c661a98fbdde0c0504da1b3a053fc3.tar.gz |
Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
module/language/tree-il/analyze.scm
module/language/tree-il/effects.scm
module/language/tree-il/fix-letrec.scm
module/language/tree-il/peval.scm
test-suite/tests/cse.test
test-suite/tests/peval.test
Diffstat (limited to 'test-suite/tests/tree-il.test')
-rw-r--r-- | test-suite/tests/tree-il.test | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test index ba76ad6e5..5d12f0c48 100644 --- a/test-suite/tests/tree-il.test +++ b/test-suite/tests/tree-il.test @@ -1103,6 +1103,26 @@ w "wrong number of arguments to")))) w))))) + (pass-if "top-level applicable struct" + (null? (call-with-warnings + (lambda () + (compile '(let ((p current-warning-port)) + (p (+ (p) 1)) + (p)) + #:opts %opts-w-arity + #:to 'assembly))))) + + (pass-if "top-level applicable struct with wrong arguments" + (let ((w (call-with-warnings + (lambda () + (compile '(let ((p current-warning-port)) + (p 1 2 3)) + #:opts %opts-w-arity + #:to 'assembly))))) + (and (= (length w) 1) + (number? (string-contains (car w) + "wrong number of arguments to"))))) + (pass-if "local toplevel-defines" (let ((w (call-with-warnings (lambda () @@ -1242,6 +1262,31 @@ #:opts %opts-w-format #:to 'assembly))))) + (pass-if "non-literal format string using gettext as top-level _" + (null? (call-with-warnings + (lambda () + (compile '(begin + (define (_ s) (gettext s "my-domain")) + (format #t (_ "~A ~A!") "hello" "world")) + #:opts %opts-w-format + #:to 'assembly))))) + + (pass-if "non-literal format string using gettext as module-ref _" + (null? (call-with-warnings + (lambda () + (compile '(format #t ((@@ (foo) _) "~A ~A!") "hello" "world") + #:opts %opts-w-format + #:to 'assembly))))) + + (pass-if "non-literal format string using gettext as lexical _" + (null? (call-with-warnings + (lambda () + (compile '(let ((_ (lambda (s) + (gettext s "my-domain")))) + (format #t (_ "~A ~A!") "hello" "world")) + #:opts %opts-w-format + #:to 'assembly))))) + (pass-if "non-literal format string using ngettext" (null? (call-with-warnings (lambda () |