diff options
author | Mark H Weaver <mhw@netris.org> | 2014-09-30 03:50:47 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2014-09-30 03:50:47 -0400 |
commit | 856d318a9f543d8a61fcf61caae7d07102586802 (patch) | |
tree | 10bd99500c027bbd472253f6cc34f8b1b516d4a1 /test-suite/tests/tree-il.test | |
parent | f7582f9807d9a10fba86f54c4aeaa7444c51a315 (diff) | |
parent | 3157d455039f137ca5dfa8b9fbc4a3404ce00606 (diff) | |
download | guile-856d318a9f543d8a61fcf61caae7d07102586802.tar.gz |
Merge branch 'stable-2.0'
Conflicts:
benchmark-suite/benchmarks/ports.bm
libguile/async.h
libguile/bytevectors.c
libguile/foreign.c
libguile/gsubr.c
libguile/srfi-1.c
libguile/vm-engine.h
libguile/vm-i-scheme.c
module/Makefile.am
module/language/tree-il/analyze.scm
module/language/tree-il/peval.scm
module/scripts/compile.scm
module/scripts/disassemble.scm
test-suite/tests/asm-to-bytecode.test
test-suite/tests/peval.test
test-suite/tests/rdelim.test
Diffstat (limited to 'test-suite/tests/tree-il.test')
-rw-r--r-- | test-suite/tests/tree-il.test | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/test-suite/tests/tree-il.test b/test-suite/tests/tree-il.test index 0f6d9451b..d52a642aa 100644 --- a/test-suite/tests/tree-il.test +++ b/test-suite/tests/tree-il.test @@ -1,8 +1,7 @@ ;;;; tree-il.test --- test suite for compiling tree-il -*- scheme -*- ;;;; Andy Wingo <wingo@pobox.com> --- May 2009 ;;;; -;;;; Copyright (C) 2009, 2010, 2011, 2012, 2013, -;;;; 2014 Free Software Foundation, Inc. +;;;; Copyright (C) 2009-2014 Free Software Foundation, Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public @@ -1132,6 +1131,50 @@ (number? (string-contains (car w) "expected 3, got 2"))))) + (pass-if "~p" + (null? (call-with-warnings + (lambda () + (compile '(((@ (ice-9 format) format) #f "thing~p" 2)) + #:opts %opts-w-format + #:to 'cps))))) + + (pass-if "~p, too few arguments" + (let ((w (call-with-warnings + (lambda () + (compile '((@ (ice-9 format) format) #f "~p") + #:opts %opts-w-format + #:to 'cps))))) + (and (= (length w) 1) + (number? (string-contains (car w) + "expected 1, got 0"))))) + + (pass-if "~:p" + (null? (call-with-warnings + (lambda () + (compile '(((@ (ice-9 format) format) #f "~d thing~:p" 2)) + #:opts %opts-w-format + #:to 'cps))))) + + (pass-if "~:@p, too many arguments" + (let ((w (call-with-warnings + (lambda () + (compile '((@ (ice-9 format) format) #f "~d pupp~:@p" 5 5) + #:opts %opts-w-format + #:to 'cps))))) + (and (= (length w) 1) + (number? (string-contains (car w) + "expected 1, got 2"))))) + + (pass-if "~:@p, too few arguments" + (let ((w (call-with-warnings + (lambda () + (compile '((@ (ice-9 format) format) #f "pupp~:@p") + #:opts %opts-w-format + #:to 'cps))))) + (and (= (length w) 1) + (number? (string-contains (car w) + "expected 1, got 0"))))) + (pass-if "~?" (null? (call-with-warnings (lambda () @@ -1202,8 +1245,7 @@ (let ((w (call-with-warnings (lambda () (let ((in (open-input-string - "(use-modules ((ice-9 format) - #:renamer (symbol-prefix-proc 'i9-))) + "(use-modules ((ice-9 format) #:prefix i9-)) (i9-format #t \"yo! ~A\" 1 2)"))) (read-and-compile in #:opts %opts-w-format |