From 1fd3f9d79cdf3f03450129020d3310b726003ed3 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 17 Nov 2005 07:27:28 +0000 Subject: Implemented the flavor function which returns the flavor of a variable ('simple', 'recursive', or 'undefined'). --- tests/ChangeLog | 4 ++++ tests/scripts/functions/flavor | 44 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 tests/scripts/functions/flavor (limited to 'tests') diff --git a/tests/ChangeLog b/tests/ChangeLog index d30f0c9..01aecc6 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2005-11-17 Boris Kolpackov + + * scripts/functions/flavor: Add a test for the flavor function. + 2005-11-14 Boris Kolpackov * scripts/variables/INCLUDE_DIRS: Add a test for the .INCLUDE_DIRS diff --git a/tests/scripts/functions/flavor b/tests/scripts/functions/flavor new file mode 100644 index 0000000..80d6be7 --- /dev/null +++ b/tests/scripts/functions/flavor @@ -0,0 +1,44 @@ +# -*-perl-*- +$description = "Test the flavor function."; + +$details = ""; + + +# Test #1: Test general logic. +# +run_make_test(' +s := s +r = r + +$(info u $(flavor u)) +$(info s $(flavor s)) +$(info r $(flavor r)) + +ra += ra +rc ?= rc + +$(info ra $(flavor ra)) +$(info rc $(flavor rc)) + +s += s +r += r + +$(info s $(flavor s)) +$(info r $(flavor r)) + + +.PHONY: all +all:;@: +', +'', +'u undefined +s simple +r recursive +ra recursive +rc recursive +s simple +r recursive'); + + +# This tells the test driver that the perl test script executed properly. +1; -- cgit v1.2.3