File: 08_preprocessor.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 (41 lines) | stat: -rw-r--r-- 711 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
35
36
37
38
39
40
41
# SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-2.0-only
require "TEST.pl";
&TEST::init;

print "1..2\n";

#   setup test files

$testfile1 = &TEST::tmpfile_with_name("file1", <<"EOT");
foo
#include file2
quux
EOT

$testfile2 = &TEST::tmpfile_with_name("file2", <<"EOT");
bar1
#include <file3>
bar3
EOT

$testfile3 = &TEST::tmpfile_with_name("file3", <<"EOT");
bar2
EOT

$testfile4 = &TEST::tmpfile(<<"EOT");
foo
bar1
bar2
bar3
quux
EOT

$x = $testfile2;
$x = $testfile3;
$tempfile5 = &TEST::tmpfile;
$rc = &TEST::system("../eperl -P $testfile1 >$tempfile5");
print ($rc == 0 ? "ok\n" : "not ok\n");
$rc = &TEST::system("cmp $testfile4 $tempfile5");
print ($rc == 0 ? "ok\n" : "not ok\n");

&TEST::cleanup;