Added tests for comparing two non-simple strings.
Fixed bug found by random test.