From bf7c82844cf12bbea6a73e321d267e3c4f10447b Mon Sep 17 00:00:00 2001 From: Stefan Farfeleder Date: Thu, 15 May 2008 19:58:44 +0000 Subject: [PATCH] Test the expansion of $LINENO. --- tools/regression/bin/sh/builtins/lineno.0 | 16 ++++++++++++++++ tools/regression/bin/sh/builtins/lineno.0.stdout | 9 +++++++++ 2 files changed, 25 insertions(+) create mode 100644 tools/regression/bin/sh/builtins/lineno.0 create mode 100644 tools/regression/bin/sh/builtins/lineno.0.stdout diff --git a/tools/regression/bin/sh/builtins/lineno.0 b/tools/regression/bin/sh/builtins/lineno.0 new file mode 100644 index 000000000000..c9311f82d253 --- /dev/null +++ b/tools/regression/bin/sh/builtins/lineno.0 @@ -0,0 +1,16 @@ +# $FreeBSD$ +echo $LINENO +echo $LINENO + +f() { + echo $LINENO + echo $LINENO +} + +f + +echo ${LINENO:-foo} +echo ${LINENO=foo} +echo ${LINENO:+foo} +echo ${LINENO+foo} +echo ${#LINENO} diff --git a/tools/regression/bin/sh/builtins/lineno.0.stdout b/tools/regression/bin/sh/builtins/lineno.0.stdout new file mode 100644 index 000000000000..82583a93c82e --- /dev/null +++ b/tools/regression/bin/sh/builtins/lineno.0.stdout @@ -0,0 +1,9 @@ +2 +3 +2 +3 +12 +13 +foo +foo +2