Home | History | Annotate | Download | only in functions
      1 #                                                                    -*-perl-*-
      2 $description = "The following test creates a makefile to verify
      3 the ability of make to strip white space from lists of object.\n";
      4 
      5 
      6 $details = "The make file is built with a list of objects that contain white space
      7 These are then run through the strip command to remove it. This is then
      8 verified by echoing the result.\n";
      9 
     10 open(MAKEFILE,"> $makefile");
     11 
     12 # The Contents of the MAKEFILE ...
     13 
     14 print MAKEFILE <<'EOMAKE';
     15 TEST1 := "Is this TERMINAL fun?                                                               What makes you believe is this terminal fun?                                                                                                                                               JAPAN is a WONDERFUL planet -- I wonder if we will ever reach                                         their level of COMPARATIVE SHOPPING..."
     16 E :=
     17 TEST2 := $E   try this     and		this     	$E
     18 
     19 define TEST3
     20 
     21 and these	        test out
     22 
     23 
     24 some
     25 blank lines
     26 
     27 
     28 
     29 endef
     30 
     31 .PHONY: all
     32 all:
     33 	@echo '$(strip  $(TEST1) )'
     34 	@echo '$(strip  $(TEST2) )'
     35 	@echo '$(strip  $(TEST3) )'
     36 
     37 space: ; @echo '$(strip ) $(strip  	   )'
     38 
     39 EOMAKE
     40 
     41 # END of Contents of MAKEFILE
     42 
     43 close(MAKEFILE);
     44 
     45 &run_make_with_options($makefile,"",&get_logfile);
     46 $answer = "\"Is this TERMINAL fun? What makes you believe is this terminal fun? JAPAN is a WONDERFUL planet -- I wonder if we will ever reach their level of COMPARATIVE SHOPPING...\"
     47 try this and this
     48 and these test out some blank lines
     49 ";
     50 &compare_output($answer,&get_logfile(1));
     51 
     52 
     53 &run_make_with_options($makefile,"space",&get_logfile);
     54 $answer = " \n";
     55 &compare_output($answer,&get_logfile(1));
     56 
     57 1;
     58