From cd3f8b4a7987d23c9af7aa6a6b3e37b9ac2b2253 Mon Sep 17 00:00:00 2001 From: Waldo Bastian Date: Wed, 13 Aug 2003 20:32:05 +0000 Subject: First attempt at a testsuit --- menu/tests/expand | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 menu/tests/expand (limited to 'menu/tests/expand') diff --git a/menu/tests/expand b/menu/tests/expand new file mode 100755 index 0000000..5dbaac8 --- /dev/null +++ b/menu/tests/expand @@ -0,0 +1,12 @@ +#!/usr/bin/perl + +# This script performs expansion of environment variables of the form ${HOME} + +while(<>) +{ + while (($a) = ($_ =~ /[^\$]*\$\{([^\}]*)\}.*/)) + { + s/([^\$]*)(\$\{$a\})(.*)/$1$ENV{$a}$3/; + } + printf $_; +} \ No newline at end of file -- cgit v1.2.3-70-g09d2