NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/51875: [PATCH] tests/usr.bin/grep/...: portability fixes



The following reply was made to PR bin/51875; it has been noted by GNATS.

From: "Ngie Cooper (yaneurabeya)" <yaneurabeya%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/51875: [PATCH] tests/usr.bin/grep/...: portability fixes
Date: Sat, 14 Jan 2017 05:30:45 -0800

 --Apple-Mail=_4B34A360-E4DA-4571-B2C4-22317F1301C2
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
 	charset=us-ascii
 
 Patch attached.
 -Ngie
 
 --Apple-Mail=_4B34A360-E4DA-4571-B2C4-22317F1301C2
 Content-Disposition: attachment;
 	filename=t_grep-portability-fixes.patch
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="t_grep-portability-fixes.patch"
 Content-Transfer-Encoding: 7bit
 
 Index: usr.bin/grep/d_binary.out
 ===================================================================
 RCS file: /cvsroot/src/tests/usr.bin/grep/d_binary.out,v
 retrieving revision 1.1
 diff -u -r1.1 d_binary.out
 --- usr.bin/grep/d_binary.out	17 Mar 2012 16:33:13 -0000	1.1
 +++ usr.bin/grep/d_binary.out	14 Jan 2017 13:27:00 -0000
 @@ -1 +1 @@
 -Binary file /bin/sh matches
 +Binary file test.file matches
 Index: usr.bin/grep/t_grep.sh
 ===================================================================
 RCS file: /cvsroot/src/tests/usr.bin/grep/t_grep.sh,v
 retrieving revision 1.2
 diff -u -r1.2 t_grep.sh
 --- usr.bin/grep/t_grep.sh	17 May 2013 15:39:17 -0000	1.2
 +++ usr.bin/grep/t_grep.sh	14 Jan 2017 13:27:00 -0000
 @@ -43,7 +43,9 @@
  }
  binary_body()
  {
 -	atf_check -o file:"$(atf_get_srcdir)/d_binary.out" grep $(uname) /bin/sh
 +	dd if=/dev/zero count=1 of=test.file
 +	echo -n "foobar" >> test.file
 +	atf_check -o file:"$(atf_get_srcdir)/d_binary.out" grep foobar test.file
  }
  
  atf_test_case recurse
 @@ -57,7 +59,7 @@
  	echo -e "cod\ndover sole\nhaddock\nhalibut\npilchard" > recurse/d/fish
  	echo -e "cod\nhaddock\nplaice" > recurse/a/f/favourite-fish
  
 -	atf_check -o file:"$(atf_get_srcdir)/d_recurse.out" grep -r haddock recurse
 +	atf_check -o file:"$(atf_get_srcdir)/d_recurse.out" -x "grep -r haddock recurse | sort"
  }
  
  atf_test_case recurse_symlink
 
 --Apple-Mail=_4B34A360-E4DA-4571-B2C4-22317F1301C2--
 


Home | Main Index | Thread Index | Old Index