Add test cases for file PackageImport.hs and related changes