fixed some build file flaws

This commit is contained in:
2022-09-25 02:08:01 +09:00
parent a828f82670
commit 9efdf82b16
204 changed files with 1160 additions and 91 deletions

36
t/h-009.hawk Normal file
View File

@ -0,0 +1,36 @@
@pragma entry main
@pragma implicit off
@include "tap.inc";
function run_test_001 ()
{
@local tmp, out;
tap_ensure (hawk::function_exists(111), 0, @SCRIPTNAME, @SCRIPTLINE);
tap_ensure (hawk::function_exists(1.69), 0, @SCRIPTNAME, @SCRIPTLINE);
tap_ensure (hawk::function_exists("111"), 0, @SCRIPTNAME, @SCRIPTLINE);
tap_ensure (hawk::function_exists(@b"111"), 0, @SCRIPTNAME, @SCRIPTLINE);
tap_ensure (hawk::function_exists("length"), 1, @SCRIPTNAME, @SCRIPTLINE);
tap_ensure (hawk::function_exists(@b"length"), 1, @SCRIPTNAME, @SCRIPTLINE);
tap_ensure (hawk::call(@b"length", "hawk"), 4, @SCRIPTNAME, @SCRIPTLINE);
tap_ensure (hawk::call("length", @b"hawk"), 4, @SCRIPTNAME, @SCRIPTLINE);
if (hawk::function_exists("sed::str_to_str"))
{
tmp = hawk::call("sed::str_to_str", "s/a/j/g", "aaabbbaaacccaaaddd", out);
tap_ensure (out === "jjjbbbjjjcccjjjddd", 1, @SCRIPTNAME, @SCRIPTLINE);
}
else
{
tap_skip (sprintf("sed::str_to_str() is unavailable - %s[%d]", @SCRIPTNAME, @SCRIPTLINE));
}
}
function main()
{
run_test_001 ();
tap_end ();
}