about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-10-08 00:59:11 -0700
committerEric Wong <normalperson@yhbt.net>2009-10-08 00:59:11 -0700
commitcc50dcc4918c82cee17d9715ec4bf2d588938042 (patch)
tree24910f05d6cd929f87e5f8c19fea403cbec4463b /t
parentee703a7af485ecdd2b8c96b0ad87f10d6b71a1fc (diff)
downloadrainbows-cc50dcc4918c82cee17d9715ec4bf2d588938042.tar.gz
Useful for prefixing individual lines of a temporary
file while catting it to stdout.  This helps make tests
easier to write and test.
Diffstat (limited to 't')
-rw-r--r--t/test-lib.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index c8e069d..e5b0bc8 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -50,3 +50,9 @@ rtmpfiles () {
                 _TEST_RM_LIST="$_TEST_RM_LIST $_tmp"
         done
 }
+
+dbgcat () {
+        id=$1
+        eval '_file=$'$id
+        sed -e "s/^/$id:/" < $_file
+}