From 2b6ceccde57615851868e2aebe31b4f9e775cb2c Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Thu, 8 Nov 2012 13:36:19 +0000 Subject: [PATCH] sh: Add tests for modifying an alias (r242766). Note: parser/alias10.0 will eat a lot of memory/cpu time when it fails (with the old sh). --- tools/regression/bin/sh/builtins/alias3.0 | 12 ++++++++++++ tools/regression/bin/sh/builtins/alias3.0.stdout | 4 ++++ tools/regression/bin/sh/parser/alias10.0 | 5 +++++ 3 files changed, 21 insertions(+) create mode 100644 tools/regression/bin/sh/builtins/alias3.0 create mode 100644 tools/regression/bin/sh/builtins/alias3.0.stdout create mode 100644 tools/regression/bin/sh/parser/alias10.0 diff --git a/tools/regression/bin/sh/builtins/alias3.0 b/tools/regression/bin/sh/builtins/alias3.0 new file mode 100644 index 000000000000..fe65e31f5f03 --- /dev/null +++ b/tools/regression/bin/sh/builtins/alias3.0 @@ -0,0 +1,12 @@ +# $FreeBSD$ +set -e + +unalias -a +alias foo=bar +alias bar= +alias quux="1 2 3" +alias foo=bar +alias bar= +alias quux="1 2 3" +alias +alias foo diff --git a/tools/regression/bin/sh/builtins/alias3.0.stdout b/tools/regression/bin/sh/builtins/alias3.0.stdout new file mode 100644 index 000000000000..52efaf0b72e7 --- /dev/null +++ b/tools/regression/bin/sh/builtins/alias3.0.stdout @@ -0,0 +1,4 @@ +bar='' +foo=bar +quux='1 2 3' +foo=bar diff --git a/tools/regression/bin/sh/parser/alias10.0 b/tools/regression/bin/sh/parser/alias10.0 new file mode 100644 index 000000000000..264f5c5f054b --- /dev/null +++ b/tools/regression/bin/sh/parser/alias10.0 @@ -0,0 +1,5 @@ +# $FreeBSD$ + +alias echo='echo' +alias echo='echo' +[ "`eval echo b`" = b ]