|
Revision 2142, 1.0 kB
(checked in by karpet, 7 months ago)
|
add some tokenizer tests and (doh!) include tokenizer.c
|
| Line | |
|---|
| 1 |
#!/usr/bin/perl |
|---|
| 2 |
use strict; |
|---|
| 3 |
use warnings; |
|---|
| 4 |
use Test::More tests => 10; |
|---|
| 5 |
use SwishTestUtils; |
|---|
| 6 |
|
|---|
| 7 |
$ENV{SWISH_DEBUG_NAMEDBUFFER} = 1; |
|---|
| 8 |
|
|---|
| 9 |
ok( my $buf = SwishTestUtils::run_lint_stderr( |
|---|
| 10 |
'properties.html', 'properties.xml' |
|---|
| 11 |
), |
|---|
| 12 |
"properties.html" |
|---|
| 13 |
); |
|---|
| 14 |
|
|---|
| 15 |
like( $buf, qr!<swishtitle>properties test page title</swishtitle>!, |
|---|
| 16 |
"swishtitle" ); |
|---|
| 17 |
|
|---|
| 18 |
like( $buf, qr!<meta1> substr: properties test page meta1!, "first meta1" ); |
|---|
| 19 |
like( $buf, qr!<meta1> substr: more meta1!, "second meta1" ); |
|---|
| 20 |
|
|---|
| 21 |
#diag($buf); |
|---|
| 22 |
|
|---|
| 23 |
ok( $buf |
|---|
| 24 |
= SwishTestUtils::run_lint_stderr( 'UPPERlower.XML', |
|---|
| 25 |
'UPPERlower.XML' ), |
|---|
| 26 |
"UPPERlower.XML" |
|---|
| 27 |
); |
|---|
| 28 |
|
|---|
| 29 |
like( $buf, qr!<swishtitle>mytitle here</swishtitle>!, "swishtitle" ); |
|---|
| 30 |
like( $buf, qr!<mytag1> substr:\s+some text!s, "mytag1" ); |
|---|
| 31 |
like( $buf, qr!<mytag1> substr:\s+yet again\s+and again!s, "mytag1 again" ); |
|---|
| 32 |
like( $buf, qr!<mytag3.foo> substr:\s+blah blah!s, "mytag3.foo" ); |
|---|
| 33 |
like( $buf, qr!<mytag3> substr:\s+foo bar!s, "mytag3" ); |
|---|