File: 09-wml.t

package info (click to toggle)
slice 1.3.8-12
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 864 kB
  • ctags: 452
  • sloc: ansic: 3,310; perl: 2,263; sh: 869; makefile: 296; yacc: 127
file content (86 lines) | stat: -rw-r--r-- 1,292 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

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

print "1..3\n";

$tmpfile1 = TEST::tmpfile(<<'EOT');
<html>
<head>
<title>[EN:Titlepage:][DE:Titelseite:]</title>
</head>
<body>

<center>
<h1>[EN:The Title itself:][DE:Der Titel selbst:]</h1>
</center>

<blockquote>
[EN:...English Abstract...:]
[DE:...Deutsche Zusammenfassung...:]
</blockquote>

[EN:...English Text...:]
[DE:...Deutscher Text...:]

</body>
</html>
EOT

$tmpfile2 = TEST::tmpfile(<<'EOT');
<html>
<head>
<title>Titlepage</title>
</head>
<body>

<center>
<h1>The Title itself</h1>
</center>

<blockquote>
...English Abstract...

</blockquote>

...English Text...


</body>
</html>
EOT
$tmpfile3 = TEST::tmpfile(<<'EOT');
<html>
<head>
<title>Titelseite</title>
</head>
<body>

<center>
<h1>Der Titel selbst</h1>
</center>

<blockquote>

...Deutsche Zusammenfassung...
</blockquote>


...Deutscher Text...

</body>
</html>
EOT

$rc = TEST::system("$ENV{SLICE} -o EN+UNDEF:test.html.en -o DE+UNDEF:test.html.de $tmpfile1");
print ($rc == 0 ? "ok\n" : "not ok\n");
$rc = TEST::system("cmp $tmpfile2 test.html.en");
print ($rc == 0 ? "ok\n" : "not ok\n");
$rc = TEST::system("cmp $tmpfile3 test.html.de");
print ($rc == 0 ? "ok\n" : "not ok\n");

push(@TEST::TMPFILES, 'test.html.en');
push(@TEST::TMPFILES, 'test.html.de');

TEST::cleanup();