Added another test case and enabled it.

This commit is contained in:
rillig 2006-11-09 12:17:35 +00:00
parent 1de5b4994d
commit 9527a32b3d
2 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.10 2006/05/12 00:05:59 rillig Exp $
# $NetBSD: Makefile,v 1.11 2006/11/09 12:17:35 rillig Exp $
NOMAN= # defined
@ -10,6 +10,6 @@ regress:
sh ${.CURDIR}/fsplit.sh
sh ${.CURDIR}/here.sh
sh ${.CURDIR}/set_e.sh
#sh ${.CURDIR}/expand.sh # First needs to be fixed.
sh ${.CURDIR}/expand.sh
.include <bsd.prog.mk>

View File

@ -1,5 +1,5 @@
#! /bin/sh
# $NetBSD: expand.sh,v 1.1 2006/05/12 00:05:59 rillig Exp $
# $NetBSD: expand.sh,v 1.2 2006/11/09 12:17:35 rillig Exp $
#
#
@ -27,3 +27,7 @@ assert_equals "1" " EOL" "$got"
set -- "" "" # This code triggered the bug.
got=`echo "$@" | sed 's,$,EOL,'`
assert_equals "2" " EOL" "$got"
line='#define bindir "/usr/bin" /* comment */'
stripped='#define bindir "/usr/bin" '
assert_equals "3" "$stripped" "${line%%/\**}"