add test case for loose type
modify type detection for loose_type option
skip test cases which are not suitable with loose mode