comments 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. $description = "The following test creates a makefile to test comments\n"
  2. ."and comment continuation to the next line using a \n"
  3. ."backslash within makefiles.";
  4. $details = "To test comments within a makefile, a semi-colon was placed \n"
  5. ."after a comment was started. This should not be reported as\n"
  6. ."an error since it is within a comment. We then continue the \n"
  7. ."comment to the next line using a backslash. To test whether\n"
  8. ."the comment really continued, we place an echo command with some\n"
  9. ."text on the line which should never execute since it should be \n"
  10. ."within a comment\n";
  11. open(MAKEFILE,"> $makefile");
  12. # The Contents of the MAKEFILE ...
  13. print MAKEFILE <<\EOF;
  14. # Test comment vs semicolon parsing and line continuation
  15. target: # this ; is just a comment \
  16. @echo This is within a comment.
  17. @echo There should be no errors for this makefile.
  18. EOF
  19. # END of Contents of MAKEFILE
  20. close(MAKEFILE);
  21. &run_make_with_options($makefile,"",&get_logfile);
  22. # Create the answer to what should be produced by this Makefile
  23. $answer = "There should be no errors for this makefile.\n";
  24. # COMPARE RESULTS
  25. &compare_output($answer,&get_logfile(1))