#!/usr/bin/perl
use blib;
use strict;
use warnings;
use Test::More tests => 10;
use Test::NoWarnings;
BEGIN { use_ok('HTML::StickyForm'); }
ok(*_escape=\&HTML::StickyForm::_escape,'"import" sub');
for(
[undef,'','undef'],
['abc','abc','no change'],
['abc&def','abc&def','amp'],
['abc&def&ghi','abc&def&ghi','amp amp'],
['<tag><soup>','<tag><soup>','<>'],
["\xff",'ÿ','8-bit'],
["\x{1ff}",'ǿ','9-bit'],
){
my($from,$to,$name)=@$_;
_escape($from);
is($from,$to,$name);
}