VirtualBox

source: kBuild/trunk/src/kmk/tests/scripts/functions/expr

Last change on this file was 2413, checked in by bird, 15 years ago

copyright year update.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1# $Id: expr 2413 2010-09-11 17:43:04Z bird $ -*-perl-*-
2## @file
3# $(expr expr)
4#
5
6#
7# Copyright (c) 2008-2010 knut st. osmundsen <[email protected]>
8#
9# This file is part of kBuild.
10#
11# kBuild is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 3 of the License, or
14# (at your option) any later version.
15#
16# kBuild is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with kBuild. If not, see <http://www.gnu.org/licenses/>
23#
24#
25
26$description = "Tests the \$(expr ) function";
27
28$details = "Much of the basic testing is taken care of by features/ifcond.
29We only make sure \$(expr ) works here).";
30
31if ($is_kmk) {
32
33 # TEST #0 - check that the feature is present.
34 # --------------------------------------------
35 run_make_test('
36ifneq ($(expr 1+1),2)
37$(error sub-test 0 failed)
38endif
39.PHONY: all
40all: ; @:
41',
42'',
43'');
44
45 # TEST #1 - basics, the $(expr test checks the rest).
46 # ---------------------------------------------------
47 run_make_test('
48ifneq ($(expr 1==1),1)
49$(error sub-test 0 failed)
50endif
51ifneq ($(expr 1!=1),0)
52$(error sub-test 1 failed)
53endif
54ifneq ($(expr 2*2),4)
55$(error sub-test 1 failed)
56endif
57ifneq ($(expr 25*25),625)
58$(error sub-test 1 failed)
59endif
60
61.PHONY: all
62all: ; @:
63',
64'',
65'');
66
67}
68
69
70
71# Indicate that we're done.
721;
73
74
Note: See TracBrowser for help on using the repository browser.

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