File: newline-warnings.t

package info (click to toggle)
libjson-validator-perl 4.14%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 828 kB
  • sloc: perl: 2,816; makefile: 14
file content (13 lines) | stat: -rw-r--r-- 308 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
use Mojo::Base -strict;

use Test::More;
use JSON::Validator;

my @warnings;
$SIG{__WARN__} = sub { push @warnings, @_ };

JSON::Validator->new->schema(q!{ "type": "object" }!."\n");

ok(!@warnings, "no warning emitted when ->schema() method is passed a valid JSON schema ending in newline");

done_testing;