[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-581-g1cb3b2f

Michael Adam obnox at samba.org
Tue Apr 1 11:44:25 GMT 2008


The branch, v3-2-test has been updated
       via  1cb3b2f065566f981f6cfb8b5efdfad7db49c719 (commit)
       via  5c1b7ee5c17489da90192309853aa1ecacc15512 (commit)
      from  da2c19c481d0041872b4ce2f5105052077f3d3b8 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 1cb3b2f065566f981f6cfb8b5efdfad7db49c719
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 1 12:48:25 2008 +0200

    test: make registry tests more portable: protect some grep patterns in ' '.
    
    Michael

commit 5c1b7ee5c17489da90192309853aa1ecacc15512
Author: Michael Adam <obnox at samba.org>
Date:   Tue Apr 1 12:45:06 2008 +0200

    test: make registry tests more portable: use 'printf "%s"' instead of 'echo -e'
    
    Michael

-----------------------------------------------------------------------

Summary of changes:
 source/script/tests/test_net_registry.sh |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/script/tests/test_net_registry.sh b/source/script/tests/test_net_registry.sh
index 927882b..fd9275a 100755
--- a/source/script/tests/test_net_registry.sh
+++ b/source/script/tests/test_net_registry.sh
@@ -62,7 +62,7 @@ test_create_existing()
 			false;
 		fi
 	else
-		echo -e "$OUTPUT"
+		printf "%s" "$OUTPUT"
 		false
 	fi
 }
@@ -84,17 +84,17 @@ test_createkey()
 	if test "x$?" != "x0" ; then
 		echo "ERROR: failed to enumerate key '${BASEKEY}'"
 		echo "output:"
-		echo -e "$OUTPUT"
+		printf "%s" "$OUTPUT"
 		false
 		return
 	fi
 
 	EXPECTED="Keyname = ${SUBKEY}"
-	echo -e "$OUTPUT" | grep ^Keyname | grep ${SUBKEY}
+	printf "%s" "$OUTPUT" | grep '^Keyname' | grep ${SUBKEY}
 	if test "x$?" != "x0" ; then
 		echo "ERROR: did not find expexted '$EXPECTED' in output"
 		echo "output:"
-		echo -e "$OUTPUT"
+		printf "%s" "$OUTPUT"
 		false
 	fi
 
@@ -120,17 +120,17 @@ test_deletekey()
 	# check enumerate of basekey does not show key anymore:
 	OUTPUT=`${NETREG} enumerate ${BASEKEY}`
 	if test "x$?" != "x0" ; then
-		echo -e "$OUTPUT"
+		printf "%s" "$OUTPUT"
 		false
 		return
 	fi
 
 	UNEXPECTED="Keyname = ${SUBKEY}"
-	echo -e "$OUTPUT" | grep ^Keyname | grep ${SUBKEY}
+	printf "%s" "$OUTPUT" | 'grep ^Keyname' | grep ${SUBKEY}
 	if test "x$?" = "x0" ; then
 		echo "ERROR: found '$UNEXPECTED' after delete in output"
 		echo "output:"
-		echo -e "$OUTPUT"
+		printf "%s" "$OUTPUT"
 		false
 	fi
 
@@ -206,7 +206,7 @@ test_deletekey_with_subkey()
 	if test "x$?" = "x0" ; then
 		echo "ERROR: delete of key with subkey succeeded"
 		echo "output:"
-		echo -e "$OUTPUT"
+		printf "%s" "$OUTPUT"
 		false
 		return
 	fi
@@ -238,19 +238,19 @@ test_setvalue()
 	if test "x$?" != "x0" ; then
 		echo "ERROR: failure calling enumerate for key ${KEY}"
 		echo output:
-		echo -e "${OUTPUT}"
+		printf "%s" "${OUTPUT}"
 		false
 		return
 	fi
 
-	echo -e "$OUTPUT" | {
+	printf "%s" "$OUTPUT" | {
 	FOUND=0
 	while read LINE ; do
-		SEARCH1=`echo $LINE | grep ^Valuename | grep ${VALNAME}`
+		SEARCH1=`echo $LINE | grep '^Valuename' | grep ${VALNAME}`
 		if test "x$?" = "x0" ; then
 			read LINE
 			read LINE
-			SEARCH2=`echo $LINE | grep "^Value " | grep ${VALVALUE}`
+			SEARCH2=`echo $LINE | grep '^Value ' | grep ${VALVALUE}`
 			if test "x$?" = "x0" ; then
 				FOUND=1
 				break
@@ -261,7 +261,7 @@ test_setvalue()
 	if test "x$FOUND" != "x1" ; then
 		echo "ERROR: did not find value '${VALNAME}' with enumerate"
 		echo "enumerate output:"
-		echo -e "$OUTPUT"
+		printf "%s" "$OUTPUT"
 		false
 		return
 	fi
@@ -301,7 +301,7 @@ test_setvalue_twice()
 
 	OUTPUT=`test_setvalue ${KEY} ${VALNAME} ${VALTYPE1} ${VALVALUE1}`
 	if test "x$?" != "x0" ; then
-		echo -e "$OUTPUT"
+		printf "%s" "$OUTPUT"
 		false
 		return
 	fi


-- 
Samba Shared Repository


More information about the samba-cvs mailing list