diff options
| author | Brian Anderson <[email protected]> | 2011-02-23 23:48:01 -0500 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-02 10:28:14 -0800 |
| commit | 9528c34774ff27b112c9e66afff6e10fa7021635 (patch) | |
| tree | 4d5f9bde4c48eed1a188f6002e88daa93f4ea28b /src/test | |
| parent | Remove parens from nullary tag constructors in docs (diff) | |
| download | rust-9528c34774ff27b112c9e66afff6e10fa7021635.tar.xz rust-9528c34774ff27b112c9e66afff6e10fa7021635.zip | |
Begin implementing #fmt in rustc
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/syntax-extension-fmt.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/test/run-pass/syntax-extension-fmt.rs b/src/test/run-pass/syntax-extension-fmt.rs index 65e7647e..66fe4fd7 100644 --- a/src/test/run-pass/syntax-extension-fmt.rs +++ b/src/test/run-pass/syntax-extension-fmt.rs @@ -1,5 +1,13 @@ use std; +import std._str; + +fn test(str actual, str expected) { + log actual; + log expected; + check (_str.eq(actual, expected)); +} + fn main() { - auto s = #fmt("hello %d friends and %s things", 10, "formatted"); - log s; + test(#fmt("hello %d friends and %s things", 10, "formatted"), + "hello 10 friends and formatted things"); } |