Tests for space functions; worked on FirstNonSpaceIndex and FirstSpaceIndex, but incomplete (tests fail)