VirtualBox

Ignore:
Timestamp:
Sep 15, 2006 5:09:38 AM (18 years ago)
Author:
bird
Message:

Untested merge with GNU Make v3.81 (vendor/gnumake/2005-05-16 -> vendor/gnumake/current).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmake/tests/scripts/features/escape

    r53 r503  
    77Make sure that escaping of '#' works.";
    88
    9 open(MAKEFILE,"> $makefile");
    10 
    11 print MAKEFILE <<'EOF';
    12 $(path)foo : ; @echo cp $^ $@
    13 
    14 foo\ bar: ; @echo 'touch "$@"'
    15 
    16 sharp: foo\#bar.ext
    17 foo\#bar.ext: ; @echo foo\#bar.ext = '$@'
    18 EOF
    199
    2010close(MAKEFILE);
     
    2313# TEST 1
    2414
    25 &run_make_with_options($makefile, "", &get_logfile);
    26 $answer = "cp foo\n";
    27 &compare_output($answer,&get_logfile(1));
     15run_make_test('
     16$(path)foo : ; @echo "touch ($@)"
     17
     18foo\ bar: ; @echo "touch ($@)"
     19
     20sharp: foo\#bar.ext
     21foo\#bar.ext: ; @echo "foo#bar.ext = ($@)"',
     22              '',
     23              'touch (foo)');
    2824
    2925# TEST 2: This one should fail, since the ":" is unquoted.
    3026
    31 &run_make_with_options($makefile, "path=p:", &get_logfile, 512);
    32 $answer = "$makefile:1: *** target pattern contains no `%'.  Stop.\n";
    33 &compare_output($answer,&get_logfile(1));
     27run_make_test(undef,
     28              'path=pre:',
     29              "#MAKEFILE#:2: *** target pattern contains no `%'.  Stop.",
     30              512);
    3431
    3532# TEST 3: This one should work, since we escape the ":".
    3633
    37 &run_make_with_options($makefile, "'path=p\\:'", &get_logfile, 0);
    38 $answer = "cp p:foo\n";
    39 &compare_output($answer,&get_logfile(1));
     34run_make_test(undef,
     35              "'path=pre\\:'",
     36              'touch (pre:foo)');
    4037
    4138# TEST 4: This one should fail, since the escape char is escaped.
    4239
    43 &run_make_with_options($makefile, "'path=p\\\\:'", &get_logfile, 512);
    44 $answer = "$makefile:1: *** target pattern contains no `%'.  Stop.\n";
    45 &compare_output($answer,&get_logfile(1));
     40run_make_test(undef,
     41              "'path=pre\\\\:'",
     42              "#MAKEFILE#:2: *** target pattern contains no `%'.  Stop.",
     43              512);
    4644
    4745# TEST 5: This one should work
    4846
    49 &run_make_with_options($makefile, "'foo bar'", &get_logfile, 0);
    50 $answer = "touch \"foo bar\"\n";
    51 &compare_output($answer,&get_logfile(1));
     47run_make_test(undef,
     48              "'foo bar'",
     49              'touch (foo bar)');
    5250
    5351# TEST 6: Test escaped comments
    5452
    55 &run_make_with_options($makefile, "sharp", &get_logfile, 0);
    56 $answer = "foo#bar.ext = foo#bar.ext\n";
    57 &compare_output($answer,&get_logfile(1));
     53run_make_test(undef,
     54              'sharp',
     55              'foo#bar.ext = (foo#bar.ext)');
    5856
    5957# This tells the test driver that the perl test script executed properly.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette