File: 95-compat-pages-single_revision_only.t

package info (click to toggle)
libmediawiki-dumpfile-perl 0.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 464 kB
  • ctags: 274
  • sloc: perl: 2,003; ansic: 508; xml: 268; sql: 47; makefile: 17; sh: 2
file content (20 lines) | stat: -rw-r--r-- 349 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!perl -w

use strict;
use warnings;

use Test::Exception tests => 1;
use MediaWiki::DumpFile::Compat;

my $file = 't/compat.revisions_test.xml';

throws_ok { test() } qr/^only one revision per page is allowed$/, 'one revision per article ok';

sub test {	
	my $pages = Parse::MediaWikiDump->pages($file);
	
	while(defined($pages->next)) { };
};