CMake: Fix test case name extraction.