File: basic-lib-no-RE2.t

package info (click to toggle)
libstring-license-perl 0.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,892 kB
  • sloc: perl: 1,519; cpp: 360; ansic: 210; python: 27; ruby: 21; xml: 16; sh: 8; makefile: 3
file content (16 lines) | stat: -rw-r--r-- 380 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use Test2::V0;
use Test2::Require::Module 'Regexp::Pattern::License' => '3.9.2';
use Test::Without::Module qw( re::engine::RE2 );

use Path::Tiny;

use String::License;

plan 1;

my $string  = path('t/grant/Apache/one_helper.rb')->slurp_utf8;
my $license = String::License->new( string => $string )->as_text;

is $license, 'Apache-2.0', 'matches expected license';

done_testing;