NetBSD-Bugs archive

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

Re: bin/51250: A '$' is printed for blank lines when invoked with -se



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

From: Sevan Janiyan <venture37%geeklan.co.uk@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/51250: A '$' is printed for blank lines when invoked with -se
Date: Thu, 16 Jun 2016 01:35:06 +0100

 This is a multi-part message in MIME format.
 --------------EFDB8D92D6D9C8336CE4479F
 Content-Type: text/plain; charset=windows-1252
 Content-Transfer-Encoding: 7bit
 
 Following on from thread on tech-userlevel, include a unit test.
 
 [1] http://mail-index.netbsd.org/tech-userlevel/2016/06/03/msg010085.html
 
 --------------EFDB8D92D6D9C8336CE4479F
 Content-Type: text/plain; charset=UTF-8;
  name="pr-bin-51250.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="pr-bin-51250.txt"
 
 Index: tests/bin/cat/Makefile
 ===================================================================
 RCS file: /cvsroot/src/tests/bin/cat/Makefile,v
 retrieving revision 1.1
 diff -u -p -u -r1.1 Makefile
 --- tests/bin/cat/Makefile	27 Mar 2012 08:16:33 -0000	1.1
 +++ tests/bin/cat/Makefile	16 Jun 2016 00:29:24 -0000
 @@ -8,5 +8,7 @@ TESTS_SH=	t_cat
  FILESDIR=	${TESTSDIR}
  FILES+=		d_align.in
  FILES+=		d_align.out
 +FILES+= 	d_se_output.in
 +FILES+= 	d_se_output.out
  
  .include <bsd.test.mk>
 Index: tests/bin/cat/d_se_output.in
 ===================================================================
 RCS file: tests/bin/cat/d_se_output.in
 diff -N tests/bin/cat/d_se_output.in
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ tests/bin/cat/d_se_output.in	16 Jun 2016 00:29:24 -0000
 @@ -0,0 +1,3 @@
 +
 +Of course it runs NetBSD
 +
 Index: tests/bin/cat/d_se_output.out
 ===================================================================
 RCS file: tests/bin/cat/d_se_output.out
 diff -N tests/bin/cat/d_se_output.out
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ tests/bin/cat/d_se_output.out	16 Jun 2016 00:29:24 -0000
 @@ -0,0 +1,3 @@
 +$
 +Of course it runs NetBSD$
 +$
 Index: tests/bin/cat/t_cat.sh
 ===================================================================
 RCS file: /cvsroot/src/tests/bin/cat/t_cat.sh,v
 retrieving revision 1.2
 diff -u -p -u -r1.2 t_cat.sh
 --- tests/bin/cat/t_cat.sh	27 Mar 2012 17:57:02 -0000	1.2
 +++ tests/bin/cat/t_cat.sh	16 Jun 2016 00:29:24 -0000
 @@ -52,8 +52,20 @@ nonexistent_body() {
  		-x "cat /some/name/that/does/not/exist"
  }
  
 +atf_test_case se_output
 +se_output_head() {
 +	atf_set "descr" "Test that cat(1) prints a $ sign " \
 +			"on blank lines with options '-se' (PR bin/51250)"
 +}
 +
 +se_output_body() {
 +	atf_check -s ignore -o file:$(atf_get_srcdir)/d_se_output.out \
 +		-x "cat -se $(atf_get_srcdir)/d_se_output.in"
 +}
 +
  atf_init_test_cases()
  {
  	atf_add_test_case align
  	atf_add_test_case nonexistent
 +	atf_add_test_case se_output
  }
 
 --------------EFDB8D92D6D9C8336CE4479F--
 


Home | Main Index | Thread Index | Old Index