summaryrefslogtreecommitdiff
path: root/tests/scripts/targets
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/targets')
-rw-r--r--tests/scripts/targets/FORCE13
-rw-r--r--tests/scripts/targets/PHONY15
-rw-r--r--tests/scripts/targets/SILENT12
-rw-r--r--tests/scripts/targets/clean5
4 files changed, 18 insertions, 27 deletions
diff --git a/tests/scripts/targets/FORCE b/tests/scripts/targets/FORCE
index 90ee48d..befb326 100644
--- a/tests/scripts/targets/FORCE
+++ b/tests/scripts/targets/FORCE
@@ -1,4 +1,4 @@
-$description = "The following tests rules without Commands or Dependencies.";
+$description = "The following tests rules without Commands or Dependencies.";
$details = "If the rule ...\n";
@@ -17,7 +17,7 @@ open(MAKEFILE,"> $makefile");
print MAKEFILE ".IGNORE :\n";
print MAKEFILE "clean: FORCE\n";
-print MAKEFILE "\t$delete_command clean\n";
+print MAKEFILE "\t$delete_command clean\n";
print MAKEFILE "FORCE:\n";
# END of Contents of MAKEFILE
@@ -26,20 +26,15 @@ close(MAKEFILE);
# Create a file named "clean". This is the same name as the target clean
-# and tricks the target into thinking that it is up to date. (Unless you
+# and tricks the target into thinking that it is up to date. (Unless you
# use the .PHONY target.
&touch("clean");
$answer = "$delete_command clean\n";
&run_make_with_options($makefile,"clean",&get_logfile);
-&compare_output($answer,&get_logfile(1));
+&compare_output($answer,&get_logfile(1));
-if (-f $example)
-{
- $test_passed = 0;
-}
-
1;
diff --git a/tests/scripts/targets/PHONY b/tests/scripts/targets/PHONY
index 14d5ae1..dd46b3f 100644
--- a/tests/scripts/targets/PHONY
+++ b/tests/scripts/targets/PHONY
@@ -27,7 +27,7 @@ print MAKEFILE ".PHONY : clean \n";
print MAKEFILE "all: \n";
print MAKEFILE "\t\@echo This makefile did not clean the dir ... good\n";
print MAKEFILE "clean: \n";
-print MAKEFILE "\t$delete_command $example clean\n";
+print MAKEFILE "\t$delete_command $example clean\n";
# END of Contents of MAKEFILE
@@ -36,20 +36,19 @@ close(MAKEFILE);
&touch($example);
# Create a file named "clean". This is the same name as the target clean
-# and tricks the target into thinking that it is up to date. (Unless you
+# and tricks the target into thinking that it is up to date. (Unless you
# use the .PHONY target.
&touch("clean");
$answer = "$delete_command $example clean\n";
&run_make_with_options($makefile,"clean",&get_logfile);
-&compare_output($answer,&get_logfile(1));
-
-if (-f $example)
-{
- $test_passed = 0;
+if (-f $example) {
+ $test_passed = 0;
}
-
+
+&compare_output($answer,&get_logfile(1));
+
1;
diff --git a/tests/scripts/targets/SILENT b/tests/scripts/targets/SILENT
index 375cad4..5f9a1db 100644
--- a/tests/scripts/targets/SILENT
+++ b/tests/scripts/targets/SILENT
@@ -22,7 +22,7 @@ open(MAKEFILE,"> $makefile");
print MAKEFILE ".SILENT : clean\n";
print MAKEFILE "clean: \n";
-print MAKEFILE "\t$delete_command EXAMPLE_FILE\n";
+print MAKEFILE "\t$delete_command EXAMPLE_FILE\n";
# END of Contents of MAKEFILE
@@ -32,13 +32,11 @@ close(MAKEFILE);
$answer = "";
&run_make_with_options($makefile,"clean",&get_logfile,0);
-
-&compare_output($answer,&get_logfile(1));
-if (-f $example)
-{
- $test_passed = 0;
+if (-f $example) {
+ $test_passed = 0;
}
-
+&compare_output($answer,&get_logfile(1));
+
1;
diff --git a/tests/scripts/targets/clean b/tests/scripts/targets/clean
index 69f4fd1..b32c976 100644
--- a/tests/scripts/targets/clean
+++ b/tests/scripts/targets/clean
@@ -33,11 +33,10 @@ $answer = "This makefile did not clean the dir... good\n";
$answer = "$delete_command $example\n";
&run_make_with_options($makefile,"clean",&get_logfile,0);
-
-&compare_output($answer,&get_logfile(1)) || &error ("abort");
if (-f $example) {
- $test_passed = 0;
+ $test_passed = 0;
}
+&compare_output($answer,&get_logfile(1)) || &error ("abort");
1;