VirtualBox

Ignore:
Timestamp:
May 16, 2005 4:54:08 PM (19 years ago)
Author:
bird
Message:

Current make snaphot, 2005-05-16.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gmake/tests/scripts/functions/word

    r53 r284  
    11#                                                                    -*-perl-*-
    2 $description = "Test the word, words, and wordlist functions.\n";
     2$description = "\
     3Test the word, words, wordlist, firstword, and lastword functions.\n";
    34
    45$details = "\
     
    8889&compare_output($answer, &get_logfile(1));
    8990
     91
     92# TEST #8 -- test $(firstword )
     93#
     94run_make_test('
     95void :=
     96list := $(void) foo bar baz #
     97
     98a := $(word 1,$(list))
     99b := $(firstword $(list))
     100
     101.PHONY: all
     102
     103all:
     104        @test "$a" = "$b" && echo $a
     105',
     106'',
     107'foo');
     108
     109
     110# TEST #9 -- test $(lastword )
     111#
     112run_make_test('
     113void :=
     114list := $(void) foo bar baz #
     115
     116a := $(word $(words $(list)),$(list))
     117b := $(lastword $(list))
     118
     119.PHONY: all
     120
     121all:
     122        @test "$a" = "$b" && echo $a
     123',
     124'',
     125'baz');
     126
    90127# This tells the test driver that the perl test script executed properly.
    911281;
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