App-skos2jskos

 view release on metacpan or  search on metacpan

t/scheme.t  view on Meta::CPAN

use File::Temp;
use JSON;

plan skip_all => "skip tests because of warning about Locale::Country and Locale::Codes"
  if $] >= 5.028;

my $dir = File::Temp::tempdir();

my $exit;
sub run { system($^X, 'script/skos2jskos', @_); $exit = $? >> 8 }
sub slurp_json { local (@ARGV,$/) = shift; JSON->new->decode(<>) }

output_is { run('-v','t/ex/empty.ttl') } 
    "Reading RDF files\n1 triples from t/ex/empty.ttl\n",
    "RDF contains no skos:ConceptScheme\n",
    "no scheme";
ok $exit, 'error';

output_is { run('t/ex/scheme.ttl','-s','x:y') } 
    "Reading RDF files\nConverting concept scheme x:y\n",
    "Concept scheme <x:y> not found or incomplete\n",

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.290 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )