tests: make the LITERAL testing more robust

It was a pretty stupid idea to rely on fragile input -- the string length
depends on the Qt version, locale settings etc etc. My bad for not catching this
earlier.

BUG: 322029
REVIEW: 111489