# HG changeset patch # User Martin Geisler # Date 1242515435 -7200 # Node ID 0a06ae261392440489e087db72f334572f15c426 # Parent 057e96fe29558cc84f3a50d38015a7360cf3df70 tests: new helper for tests with binary output diff -r 057e96fe2955 -r 0a06ae261392 tests/repr.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/repr.py Sun May 17 01:10:35 2009 +0200 @@ -0,0 +1,11 @@ +#!/usr/bin/env python +# +# Copyright 2009 Matt Mackall and others +# +# This software may be used and distributed according to the terms of the +# GNU General Public License version 2, incorporated herein by reference. + +"""prints repr(sys.stdin) but preserves newlines in input""" + +import sys +print repr(sys.stdin.read())[1:-1].replace('\\n', '\n'),