#!/usr/bin/local/ruby require 'gentlecms/uri' test = [ ["http://example.com/", "http://example.com"], ["HTTP://example.com/", "http://example.com/"], ["http://example.com/", "http://example.com:/"], ["http://example.com/", "http://example.com:80/"], ["http://example.com/", "http://Example.com/"], ["http://example.com/~smith/", "http://example.com/%7Esmith/"], ["http://example.com/~smith/", "http://example.com/%7esmith/"], ["http://example.com/%7Esmith/", "http://example.com/%7esmith/"], ["http://example.com/%C3%87", "http://example.com/C%CC%A7"], ] for pair in test printf("%-29s%-29s%s\n", pair[0], pair[1], GentleCMS::URI.parse(pair[0]) == GentleCMS::URI.parse(pair[1])) end