summaryrefslogtreecommitdiff
path: root/tests/scripts/functions/strip
blob: 8222433f315eef7eba6524033e21af51b6e3b74e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#                                                                    -*-perl-*-
$description = "The following test creates a makefile to verify
the ability of make to strip white space from lists of object.\n";


$details = "The make file is built with a list of objects that contain white space
These are then run through the strip command to remove it. This is then
verified by echoing the result.\n";

open(MAKEFILE,"> $makefile");

# The Contents of the MAKEFILE ...

print MAKEFILE <<'EOMAKE';
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..."
E :=
TEST2 := $E   try this     and		this     	$E

define TEST3

and these	        test out


some
blank lines



endef

.PHONY: all
all:
	@echo '$(strip  $(TEST1) )'
	@echo '$(strip  $(TEST2) )'
	@echo '$(strip  $(TEST3) )'

space: ; @echo '$(strip ) $(strip  	   )'

EOMAKE

# END of Contents of MAKEFILE

close(MAKEFILE);

&run_make_with_options($makefile,"",&get_logfile);
$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...\"
try this and this
and these test out some blank lines
";
&compare_output($answer,&get_logfile(1));


&run_make_with_options($makefile,"space",&get_logfile);
$answer = " \n";
&compare_output($answer,&get_logfile(1));

1;