File: 11_validate_sinclude.t

package info (click to toggle)
eperl 2.2.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 608 kB
  • sloc: ansic: 1,692; perl: 252; makefile: 139; sh: 10
file content (34 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (2)
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
# SPDX-License-Identifier: 0BSD
require "TEST.pl";
TEST::init();

print "1..1\n";

$included2 = TEST::tmpfile(<<"EOF");
<<::system("id")::>>
EOF

$included = TEST::tmpfile(<<"EOF");
<:="A":>
#include $included2
<:="B":>
EOF

$basefile = TEST::tmpfile(<<"EOF");
a
#sinclude $included
b
EOF

$result = `../eperl -P $basefile`;

$want = <<"EOF";
a
="A"
system("id")
="B"
b
EOF
print ($want eq $result ? "ok" : "not ok");

TEST::cleanup();