Trim the title, perform double comparisons

Trim the title, only \n is removed by getline. Perform double
comparisons in the test.

Change-Id: If1e9da5c0ed08e5ddbca006ba95093bbfcee961e
Merge branch 'mdl-regression-fixes'

Change-Id: Ibebafe55a9f3bf11637acb104d43753153eb12d4