#!/usr/bin/perl
# Test the accuracy of URL encoding and decoding functions.

use gnump3d::url;

# Test string, containing 'special' characters.
my $text = 'This is a string%%$ ~#$$O##@$(%*&^())__+?>#^';

my $encoded = gnump3d::url::urlEncode( $text );

my $decoded = gnump3d::url::urlDecode( $encoded );

if ( $decoded eq $text )
{
    exit 0;
}
else
{
    print "Expected: $text\nGot: $decoded\n";
    exit 1;
}
