File: 00valid_name.t

package info (click to toggle)
libxml-sax-machines-perl 0.46-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 436 kB
  • sloc: perl: 1,767; makefile: 9
file content (25 lines) | stat: -rw-r--r-- 365 bytes parent folder | download | duplicates (6)
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
use strict;

use Test;
use XML::SAX::Machine;

my @tests = (
["A",        1],
["Foo_1",    1],
["Foo::Bar", 0],
["Foo-Bar",  0],
["1Foo",     0],
["Foo\n",    0],
["Foo ",     0],
[" Foo",     0],
["Foo,",     0],
["foo,",     0],
["1",        0],
);

plan tests => scalar @tests;

for (@tests) {
    ok XML::SAX::Machine::_valid_name $_->[0], $_->[1], $_->[0];
}