aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2011-04-11 21:36:10 -0400
committerBrian Anderson <[email protected]>2011-04-11 21:54:03 -0400
commitbba245f3e6cdf9203cfafe7e8a81739a499b20eb (patch)
tree4333ee7ef70ca5d8f71deb0dbc42c0ec7541bde0 /src/test
parentMove ExtFmt compile-time functions into their own module (diff)
downloadrust-bba245f3e6cdf9203cfafe7e8a81739a499b20eb.tar.xz
rust-bba245f3e6cdf9203cfafe7e8a81739a499b20eb.zip
Add support for bool, char to extfmt.
XFAIL syntax-extension-fmt in rustboot.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/syntax-extension-fmt.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/test/run-pass/syntax-extension-fmt.rs b/src/test/run-pass/syntax-extension-fmt.rs
index db0d8a19..2eb25099 100644
--- a/src/test/run-pass/syntax-extension-fmt.rs
+++ b/src/test/run-pass/syntax-extension-fmt.rs
@@ -1,3 +1,4 @@
+// xfail-boot
// xfail-stage0
use std;
import std._str;
@@ -11,7 +12,13 @@ fn test(str actual, str expected) {
fn main() {
test(#fmt("hello %d friends and %s things", 10, "formatted"),
"hello 10 friends and formatted things");
- test(#fmt("d: %d", 1), "d: 1");
- test(#fmt("i: %i", 2), "i: 2");
- test(#fmt("s: %s", "test"), "s: test");
+
+ // Simple tests for types
+ test(#fmt("%d", 1), "1");
+ test(#fmt("%i", 2), "2");
+ test(#fmt("%i", -1), "-1");
+ test(#fmt("%s", "test"), "test");
+ test(#fmt("%b", true), "true");
+ test(#fmt("%b", false), "false");
+ test(#fmt("%c", 'A'), "A");
}