VirtualBox

source: kBuild/vendor/gnumake/current/tests/scripts/functions/andor@ 3208

最後變更 在這個檔案從3208是 2596,由 bird 提交於 13 年 前

gnumake/current -> 3.82-cvs.

  • 屬性 svn:eol-style 設為 LF
檔案大小: 1.3 KB
 
1# -*-perl-*-
2$description = "Test the and & or functions.\n";
3
4$details = "Try various uses of and & or to ensure they all give the correct
5results.\n";
6
7# TEST #0
8# For $(and ...), it will either be empty or the last value
9run_make_test('
10NEQ = $(subst $1,,$2)
11f =
12t = true
13
14all:
15 @echo 1 $(and ,$t)
16 @echo 2 $(and $t)
17 @echo 3 $(and $t,)
18 @echo 4 $(and z,true,$f,false)
19 @echo 5 $(and $t,$f,$(info bad short-circuit))
20 @echo 6 $(and $(call NEQ,a,b),true)
21 @echo 7 $(and $(call NEQ,a,a),true)
22 @echo 8 $(and z,true,fal,se) hi
23 @echo 9 $(and ,true,fal,se)there
24 @echo 10 $(and $(e) ,$t)',
25 '',
26 "1\n2 true\n3\n4\n5\n6 true\n7\n8 se hi\n9 there\n10\n");
27
28# TEST #1
29# For $(or ...), it will either be empty or the first true value
30run_make_test('
31NEQ = $(subst $1,,$2)
32f =
33t = true
34
35all:
36 @echo 1 $(or , )
37 @echo 2 $(or $t)
38 @echo 3 $(or ,$t)
39 @echo 4 $(or z,true,$f,false)
40 @echo 5 $(or $t,$(info bad short-circuit))
41 @echo 6 $(or $(info short-circuit),$t)
42 @echo 7 $(or $(call NEQ,a,b),true)
43 @echo 8 $(or $(call NEQ,a,a),true)
44 @echo 9 $(or z,true,fal,se) hi
45 @echo 10 $(or ,true,fal,se)there
46 @echo 11 $(or $(e) ,$f)',
47 '',
48 "short-circuit\n1\n2 true\n3 true\n4 z\n5 true\n6 true\n7 b\n8 true\n9 z hi\n10 truethere\n11\n");
49
501;
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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