core: fix indent for 'break' in 'case' block, refactor tests