[devscripts] 02/02: uscan test suite: Fix containsName

Joachim Breitner nomeata at moszumanska.debian.org
Sun Mar 16 12:51:40 UTC 2014


This is an automated email from the git hooks/post-receive script.

nomeata pushed a commit to branch master
in repository devscripts.

commit 226d2e2244159d2281d08c98f3fdd2d00d96c185
Author: Joachim Breitner <nomeata at debian.org>
Date:   Sun Mar 16 13:21:36 2014 +0100

    uscan test suite: Fix containsName
---
 test/test_uscan | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/test/test_uscan b/test/test_uscan
index c350b2a..f84816f 100755
--- a/test/test_uscan
+++ b/test/test_uscan
@@ -32,7 +32,7 @@ cleanup(){
 trap cleanup 1 2 3 13 15
 
 containsName(){
-  expr "$1" : ".*/$2" > /dev/null
+  echo "$1" | fgrep -q "$2"
   echo $?
 }
 
@@ -159,6 +159,8 @@ END
     assertNotNull 'pristine tarball is not xz-compressed' \
                   "$( file $TMPDIR/$TARBALL | grep 'XZ compressed data' )"
     CONTENTS="$(tar atf $TMPDIR/$TARBALL)"
+    assertTrue 'file that must be present is excluded in the tarball'	\
+                $(containsName "$CONTENTS" include-this)
     assertFalse 'file that must be excluded is present in the tarball'	\
                 $(containsName "$CONTENTS" exclude-this)
     assertFalse "dir that must be excluded is present in the tarball"	\

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list