Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libcurses Add a script that allows a check file to...
details: https://anonhg.NetBSD.org/src/rev/cd81ecb1f09e
branches: trunk
changeset: 999555:cd81ecb1f09e
user: blymn <blymn%NetBSD.org@localhost>
date: Sun Jun 09 07:54:55 2019 +0000
description:
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).
diffstat:
tests/lib/libcurses/chk_gen | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diffs (20 lines):
diff -r d71c9c1c2e97 -r cd81ecb1f09e tests/lib/libcurses/chk_gen
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/lib/libcurses/chk_gen Sun Jun 09 07:54:55 2019 +0000
@@ -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}"
Home |
Main Index |
Thread Index |
Old Index