Module Name:    src
Committed By:   apb
Date:           Thu Oct  9 06:52:37 UTC 2014

Modified Files:
        src/tests/lib/librumphijack: t_tcpip.sh

Log Message:
Avoid literal <CR> in sed regular expression.
Instead, use printf(1) to save the regexp in a shell variable,
taking advantage of the fact that printf understands "\r".

This should fix a complaint from subversion, reported in PR 49249.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/lib/librumphijack/t_tcpip.sh

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

Modified files:

Index: src/tests/lib/librumphijack/t_tcpip.sh
diff -u src/tests/lib/librumphijack/t_tcpip.sh:1.13 src/tests/lib/librumphijack/t_tcpip.sh:1.14
--- src/tests/lib/librumphijack/t_tcpip.sh:1.13	Fri Jan  3 13:18:00 2014
+++ src/tests/lib/librumphijack/t_tcpip.sh	Thu Oct  9 06:52:37 2014
@@ -1,4 +1,4 @@
-#       $NetBSD: t_tcpip.sh,v 1.13 2014/01/03 13:18:00 pooka Exp $
+#       $NetBSD: t_tcpip.sh,v 1.14 2014/10/09 06:52:37 apb Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -53,8 +53,9 @@ http_body()
 	# check that we got what we wanted
 	atf_check -o match:'HTTP/1.0 200 OK' cat webfile
 	atf_check -o match:'Content-Length: 95' cat webfile
+	blank_line_re="$(printf '^\r$')" # matches a line with only <CR><LF>
 	atf_check -o file:"$(atf_get_srcdir)/index.html" \
-	    sed -n '1,/^$/!p' webfile
+	    sed -n "1,/${blank_line_re}/!p" webfile
 }
 
 http_cleanup()

Reply via email to