blob: 1641a1f199c76313ab6ba197d5c9f16950268193 [file] [log] [blame]
H. Peter Anvin (Intel)e91f5cc2019-10-23 12:59:06 -07001%defalias foo bar
2%ifdef foo
3 %error "foo should not be defined here!"
4%endif
5
6%define foo 33
7%ifndef foo
8 %error "foo should be defined here!"
9%endif
10%ifndef bar
11 %error "bar should be defined here!"
12%endif
13%if bar != 33
14 %error "bar should have the value 33 here"
15%endif
16
17%define bar 34
18%if foo != 34
19 %error "foo should have the value 34 here"
20%endif
21
22%undef foo
23%ifdef foo
24 %error "foo should not be defined here!"
25%endif
26%ifdef bar
27 %error "bar should not be defined here!"
28%endif
29
30%ifndefalias foo
31 %error "foo was removed as an alias!"
32%endif
33
34%define bar 35
35%if foo != 35
36 %error "foo should have the value 35 here"
37%endif
38
39%define foo 36
40%if bar != 36
41 %error "bar should have the value 36 here"
42%endif
43
44%undefalias foo
45%ifdef foo
46 %error "foo is still defined after %undefalias"
47%elifdefalias foo
48 %error "foo is undefined, but still an alias"
49%endif
50%ifndef bar
51 %error "bar disappeared after %undefalias foo"
52%endif