xref: /freebsd/contrib/bmake/unit-tests/varmod-root.mk (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1# $NetBSD: varmod-root.mk,v 1.5 2021/12/05 22:31:58 rillig Exp $
2#
3# Tests for the :R variable modifier, which returns the filename root
4# without the extension.
5
6.if ${a/b/c:L:R} != "a/b/c"
7.  error
8.endif
9
10.if ${def:L:R} != "def"
11.  error
12.endif
13
14.if ${a.b.c:L:R} != "a.b"
15.  error
16.endif
17
18.if ${a.b/c:L:R} != "a"
19.  error
20.endif
21
22.if ${a:L:R} != "a"
23.  error
24.endif
25
26.if ${a.a:L:R} != "a"
27.  error
28.endif
29
30.if ${.gitignore:L:R} != ""
31.  error
32.endif
33
34.if ${trailing/:L:R} != "trailing/"
35.  error
36.endif
37
38all:
39