Module Name:    src
Committed By:   blymn
Date:           Sun Jun  9 07:54:55 UTC 2019

Added Files:
        src/tests/lib/libcurses: chk_gen

Log Message:
Add a script that allows a check file to be created by cutting and
pasting the contents of the square brackets in the "Excess nn bytes
from slave" message emitted when the director is running in verbose
mode (-v).


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/tests/lib/libcurses/chk_gen

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/tests/lib/libcurses/chk_gen
diff -u /dev/null src/tests/lib/libcurses/chk_gen:1.1
--- /dev/null	Sun Jun  9 07:54:55 2019
+++ src/tests/lib/libcurses/chk_gen	Sun Jun  9 07:54:55 2019
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# Simple script that will generate a check file from input pasted
+# in, translate the octal \012 to \n and \015 to \r and then printf
+# the resulting string.  This allows output from the verbose cursts
+# test to be translated into a check file simply.
+#
+OUT=""
+while read -r line
+do
+	next=`echo $line | sed -e 's/\n//' -e 's/\\015/\\r/g' -e 's/\\012/\\n/g'`
+	OUT="${OUT}${next}"
+done
+OUT=`echo "${OUT}" | sed 's/\n//'`
+
+printf "${OUT}"

Reply via email to