File: 09-parser.t

package info (click to toggle)
libmarc-spec-perl 2.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 244 kB
  • sloc: perl: 686; makefile: 2
file content (11 lines) | stat: -rw-r--r-- 419 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
use Test::More;
use MARC::Spec::Parser;

my $parser = MARC::Spec::parse('006[0-3]^1{$b}');
ok $parser->indicator->position eq '1', 'indicator position';
ok $parser->indicator->subspecs->[0]->left->field->tag eq '006', 'subspec field tag';

$parser = MARC::Spec::parse('006{^1}');
ok $parser->field->subspecs->[0]->right->indicator->position eq '1', 'subspec indicator position abbreviation1';

done_testing();