File: negative

package info (click to toggle)
make-doc-non-dfsg 4.0-2
  • links: PTS, VCS
  • area: non-free
  • in suites: jessie, jessie-kfreebsd
  • size: 7,460 kB
  • ctags: 2,038
  • sloc: ansic: 26,371; sh: 4,962; perl: 1,135; makefile: 168; lisp: 26; sed: 16
file content (46 lines) | stat: -rw-r--r-- 1,087 bytes parent folder | download | duplicates (25)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#                                                                    -*-perl-*-

$description = "Run some negative tests (things that should fail).";

# TEST #0
# Check that non-terminated variable references are detected (and
# reported using the best filename/lineno info
run_make_test('
foo = bar
x = $(foo
y = $x

all: ; @echo $y
',
              '', '#MAKEFILE#:3: *** unterminated variable reference.  Stop.',
              512);

# TEST #1
# Bogus variable value passed on the command line.
run_make_test(undef,
              'x=\$\(other',
              '#MAKEFILE#:4: *** unterminated variable reference.  Stop.',
              512);

# TEST #2
# Again, but this time while reading the makefile.
run_make_test('
foo = bar
x = $(foo
y = $x

z := $y

all: ; @echo $y
',
              '', '#MAKEFILE#:3: *** unterminated variable reference.  Stop.',
              512);

# TEST #3
# Bogus variable value passed on the command line.
run_make_test(undef,
              'x=\$\(other',
              '#MAKEFILE#:4: *** unterminated variable reference.  Stop.',
              512);

1;