File: 01-union.t

package info (click to toggle)
slice 1.3.8-14
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 872 kB
  • sloc: ansic: 3,310; perl: 2,263; sh: 869; makefile: 296; yacc: 127
file content (33 lines) | stat: -rw-r--r-- 757 bytes parent folder | download | duplicates (9)
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

require "TEST.pl";
TEST::init();

print "1..4\n";

$tmpfile1 = TEST::tmpfile(<<'EOT');
foo
[FOO:Inside first foo:][BAR:Inside first bar:]
bar
[FOO:Inside second foo[BAR:Inside second bar:]:]
EOT

$tmpfile2 = TEST::tmpfile(<<'EOT');
foo
Inside first fooInside first bar
bar
Inside second fooInside second bar
EOT
$tmpfile3 = TEST::tmpfile();

$rc = TEST::system("$ENV{SLICE} -o ALLuFOOuBAR:$tmpfile3 $tmpfile1");
print ($rc == 0 ? "ok\n" : "not ok\n");
$rc = TEST::system("cmp $tmpfile2 $tmpfile3");
print ($rc == 0 ? "ok\n" : "not ok\n");

$rc = TEST::system("$ENV{SLICE} -o ALL+FOO+BAR:$tmpfile3 $tmpfile1");
print ($rc == 0 ? "ok\n" : "not ok\n");
$rc = TEST::system("cmp $tmpfile2 $tmpfile3");
print ($rc == 0 ? "ok\n" : "not ok\n");

TEST::cleanup();