File: test-empty-string.t

package info (click to toggle)
libjson-parse-perl 0.62-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 572 kB
  • sloc: ansic: 3,614; perl: 475; makefile: 12
file content (11 lines) | stat: -rw-r--r-- 306 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
# This tests for an old bug where empty strings didn't work properly.
use FindBin '$Bin';
use lib "$Bin";
use JPT;
my $json = parse_json ('{"buggles":"","bibbles":""}');
is ($json->{buggles}, '');
is ($json->{bibbles}, '');
$json->{buggles} .= "chuggles";
is ($json->{bibbles}, '');
done_testing ();
exit;