From bab021a6203127f38fb89c61cc41deb3e0abbe62 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 17 Mar 2020 07:33:41 +0200 Subject: Add $defined() function --- tests/function/builtin/testscript | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'tests') 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 + : + $* <'true' + foo = [null] + print $defined(foo) + EOI + + : false + : + $* <'false' + print $defined(foo) + EOI +} + : type : { @@ -93,9 +110,7 @@ :1:8: error: unmatched call to getenv() /(( info: candidate: getenv(), qualified name builtin.getenv - info: candidate: getenv(string), qualified name builtin.getenv /)|( - info: candidate: getenv(string), qualified name builtin.getenv info: candidate: getenv(), qualified name builtin.getenv /)) EOE -- cgit v1.1