aboutsummaryrefslogtreecommitdiff
path: root/tests/function
diff options
context:
space:
mode:
Diffstat (limited to 'tests/function')
-rw-r--r--tests/function/builtin/testscript19
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/function/builtin/testscript b/tests/function/builtin/testscript
index acd544d..3d31ca2 100644
--- a/tests/function/builtin/testscript
+++ b/tests/function/builtin/testscript
@@ -3,6 +3,23 @@
.include ../../common.testscript
+: defined
+:
+{
+ : true
+ :
+ $* <<EOI >'true'
+ foo = [null]
+ print $defined(foo)
+ EOI
+
+ : false
+ :
+ $* <<EOI >'false'
+ print $defined(foo)
+ EOI
+}
+
: type
:
{
@@ -93,9 +110,7 @@
<stdin>:1:8: error: unmatched call to getenv()
/((
info: candidate: getenv(<untyped>), qualified name builtin.getenv
- info: candidate: getenv(string), qualified name builtin.getenv
/)|(
- info: candidate: getenv(string), qualified name builtin.getenv
info: candidate: getenv(<untyped>), qualified name builtin.getenv
/))
EOE