[#858] Only strip trailing newline when searching output in tests

Previously, getiCmdBoolean would strip all white space