tests/basics/string_compare.py: Add test with string that hashes to 0.

The string "Q+?" is special in that it hashes to zero with the djb2
algorithm (among other strings), and a zero hash should be incremented to a
hash of 1.
pull/1/head
Damien George 2018-04-05 01:04:38 +10:00
parent 22161acf47
commit 1bfc774a08
1 changed files with 3 additions and 0 deletions

View File

@ -53,3 +53,6 @@ print("1/" <= "1")
# that does have a hash, but the lengths of the two strings are different
import sys
print(sys.version == 'a long string that has a hash')
# this special string would have a hash of 0 but is incremented to 1
print('Q+?' == 'Q' + '+?')