fixed some build file flaws
This commit is contained in:
36
t/h-009.hawk
Normal file
36
t/h-009.hawk
Normal 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 ();
|
||||
}
|
||||
|
Reference in New Issue
Block a user