From 5850a75952012c7bcc3a501b796a5ea92ae05fbd Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sat, 8 Apr 2017 21:57:59 +0000 Subject: [PATCH] sh: Add test for unaliasing an alias that is currently in use. This already works correctly. --- bin/sh/tests/parser/Makefile | 1 + bin/sh/tests/parser/alias16.0 | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 bin/sh/tests/parser/alias16.0 diff --git a/bin/sh/tests/parser/Makefile b/bin/sh/tests/parser/Makefile index b5ac5661063b..60b0e43ca7b0 100644 --- a/bin/sh/tests/parser/Makefile +++ b/bin/sh/tests/parser/Makefile @@ -22,6 +22,7 @@ ${PACKAGE}FILES+= alias12.0 ${PACKAGE}FILES+= alias13.0 ${PACKAGE}FILES+= alias14.0 ${PACKAGE}FILES+= alias15.0 alias15.0.stdout +${PACKAGE}FILES+= alias16.0 ${PACKAGE}FILES+= and-pipe-not.0 ${PACKAGE}FILES+= case1.0 ${PACKAGE}FILES+= case2.0 diff --git a/bin/sh/tests/parser/alias16.0 b/bin/sh/tests/parser/alias16.0 new file mode 100644 index 000000000000..2df9c254e57d --- /dev/null +++ b/bin/sh/tests/parser/alias16.0 @@ -0,0 +1,7 @@ +# $FreeBSD$ + +v=1 +alias a='unalias a +v=2' +eval a +[ "$v" = 2 ]