makeCmdOptTestlistTest (cmdoptdata, testlistdata) =
  let
    createFilterFile =
      do
        createDirectory "TestDir"
        writeFile "TestDir/testlist"
                  (intercalate "\n" (makeFilters testlistdata))

    delFilterFile = removeFile "TestDir/testlist" >> delTestDir
  in
    ("cmdopt_testlist____" ++ makeName cmdoptdata ++ "___" ++
     makeName testlistdata, createFilterFile, delFilterFile,
     shouldPass cmdoptdata && shouldPass testlistdata, map fst cmdoptdata,
     quietOpts { testlist = ["TestDir/testlist"],
                 filters = makeFilters cmdoptdata })
makeCmdOptTestlistTest (cmdoptdata, testlistdata) =
  let
    createFilterFile =
      do
        createDirectory "TestDir"
        writeFile "TestDir/testlist"
                  (intercalate "\n" (makeFilters testlistdata))

    delFilterFile = removeFile "TestDir/testlist" >> delTestDir
  in
    ("cmdopt_testlist____" ++ makeName cmdoptdata ++ "___" ++
     makeName testlistdata, createFilterFile, delFilterFile,
     shouldPass cmdoptdata && shouldPass testlistdata, map fst cmdoptdata,
     quietOpts { testlist = ["TestDir/testlist"],
                 filters = makeFilters cmdoptdata })
makeCmdOptTestlistTest (cmdoptdata, testlistdata) =
  let
    createFilterFile =
      do
        createDirectory "TestDir"
        writeFile "TestDir/testlist"
                  (intercalate "\n" (makeFilters testlistdata))

    delFilterFile = removeFile "TestDir/testlist" >> delTestDir
  in
    ("cmdopt_testlist____" ++ makeName cmdoptdata ++ "___" ++
     makeName testlistdata, createFilterFile, delFilterFile,
     shouldPass cmdoptdata && shouldPass testlistdata, map fst cmdoptdata,
     quietOpts { testlist = ["TestDir/testlist"],
                 filters = makeFilters cmdoptdata })