Checking longest common substring in test data