Skip to content

Commit

Permalink
Add unittest to TArrayStream to test printf does not SEGV
Browse files Browse the repository at this point in the history
  • Loading branch information
Iain Buclaw committed Jul 19, 2012
1 parent 7688e08 commit acf76f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions std/stream.d
Expand Up @@ -2644,6 +2644,9 @@ unittest {
assert (m.position == 10);
assert (m.available == 90);
assert (m.size == 100);
m.seekSet (0);
assert (m.printf ("Answer is %d", 42) == 12);
assert (buf[0..12] == "Answer is 42");
}

/// This subclass reads and constructs an array of bytes in memory.
Expand Down

0 comments on commit acf76f2

Please sign in to comment.