]> git.lizzy.rs Git - rust.git/commitdiff
Add a test for std::fmt::Write::write_char
authorSimon Sapin <simon.sapin@exyr.org>
Wed, 22 Apr 2015 06:52:18 +0000 (08:52 +0200)
committerSimon Sapin <simon.sapin@exyr.org>
Wed, 22 Apr 2015 06:52:18 +0000 (08:52 +0200)
src/test/run-pass/ifmt.rs

index ea9db9b1e1f8d91aabb86d5628b4c727f9af657f..393a3967d96d81377ff85fbdd82a02b2e33cefe9 100644 (file)
@@ -196,9 +196,11 @@ fn test_write() {
         write!(w, "{}", "hello");
         writeln!(w, "{}", "line");
         writeln!(w, "{foo}", foo="bar");
+        w.write_char('☃');
+        w.write_str("str");
     }
 
-    t!(buf, "34helloline\nbar\n");
+    t!(buf, "34helloline\nbar\n☃str");
 }
 
 // Just make sure that the macros are defined, there's not really a lot that we