| 
									
										
										
										
											2022-04-05 14:26:21 +00:00
										 |  |  | @pragma entry main | 
					
						
							|  |  |  | @pragma implicit off | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-08 03:42:20 +00:00
										 |  |  | @include "tap.inc"; | 
					
						
							| 
									
										
										
										
											2022-04-05 14:26:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | function run_test_001 () | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	@local tmp, out; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-08 10:52:15 +00:00
										 |  |  | 	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); | 
					
						
							| 
									
										
										
										
											2022-04-08 23:57:23 +00:00
										 |  |  | 	tap_ensure (hawk::function_exists("length"), 1, @SCRIPTNAME, @SCRIPTLINE); | 
					
						
							|  |  |  | 	tap_ensure (hawk::function_exists(@b"length"), 1, @SCRIPTNAME, @SCRIPTLINE); | 
					
						
							| 
									
										
										
										
											2022-04-08 10:52:15 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	tap_ensure (hawk::call(@b"length", "hawk"), 4, @SCRIPTNAME, @SCRIPTLINE); | 
					
						
							|  |  |  | 	tap_ensure (hawk::call("length", @b"hawk"), 4, @SCRIPTNAME, @SCRIPTLINE); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-06 15:49:23 +00:00
										 |  |  | 	if (hawk::function_exists("sed::str_to_str")) | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		tmp = hawk::call("sed::str_to_str", "s/a/j/g", "aaabbbaaacccaaaddd", out); | 
					
						
							| 
									
										
										
										
											2022-04-08 03:42:20 +00:00
										 |  |  | 		tap_ensure (out === "jjjbbbjjjcccjjjddd", 1, @SCRIPTNAME, @SCRIPTLINE); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	else | 
					
						
							|  |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2022-06-03 05:20:32 +00:00
										 |  |  | 		tap_skip (sprintf("sed::str_to_str() is unavailable - %s[%d]", @SCRIPTNAME, @SCRIPTLINE)); | 
					
						
							| 
									
										
										
										
											2022-04-06 15:49:23 +00:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2022-04-05 14:26:21 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | function main() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	run_test_001 (); | 
					
						
							| 
									
										
										
										
											2022-04-08 03:42:20 +00:00
										 |  |  | 	tap_end (); | 
					
						
							| 
									
										
										
										
											2022-04-05 14:26:21 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 |