Akron | a3f74f5 | 2024-07-17 17:18:17 +0200 | [diff] [blame^] | 1 | #!/usr/bin/env perl |
| 2 | use strict; |
| 3 | use warnings; |
| 4 | use Test::More; |
| 5 | use File::Basename; |
| 6 | use File::Spec::Functions; |
| 7 | use Data::Dumper; |
| 8 | |
| 9 | use Test::Output; |
| 10 | use Mojo::JSON 'decode_json'; |
| 11 | |
| 12 | my $script = catfile(dirname(__FILE__), '..', 'script', 'cosmasvc2koralquery'); |
| 13 | my $list1 = catfile(dirname(__FILE__), 'data', 'list-example.ls'); |
| 14 | |
| 15 | # Check STDOUT |
| 16 | stdout_like( |
| 17 | sub { |
| 18 | system($script, 'list', $list1); |
| 19 | }, |
| 20 | qr!Convert!, |
| 21 | "check stdout" |
| 22 | ); |
| 23 | |
| 24 | # Check JSON |
| 25 | # my $protocol = join('', `$script list $list1`); |
| 26 | |
| 27 | done_testing; |
| 28 | __END__ |