 defmodule RadpathTests.RadpathFacts do
 
   # use Amrita.Sweet
-  # use ExUnit.Case, async: true
-  use ExUnit.Case
+  use ExUnit.Case, async: true
   use PatternTap
 
   import PathHelpers

        assert File.exists?(path)
    end

    defmodule ZipTest do
      use ExUnit.Case
      try do
        Path.join(fixture_path, "Testdir1.zip") |> File.exists? |> refute
        Radpath.zip([fixture_path], "Testdir1.zip")
        # "Testdir1.zip" |> File.exists?
        "Testdir1.zip" |> File.exists?
        # System.cmd("zip",["-T","Testdir1.zip"])
        # |> {"test of Testdir1.zip OK\n", 0}
        # System.cmd("zipinfo",["-1","Testdir1.zip"])
        # |> tap({result_str, _} ~> result_str)
        # |> contains "testdir1"
      after
        File.rm_rf("Testdir1.zip")
      end
    end

    defmodule TestZipOnePath  do
       use ExUnit.Case

      dir = Path.join(fixture_path, "testdir2")

      try do
        Path.join(fixture_path, "Testdir2.zip") |> File.exists? |> refute
        Radpath.zip([dir], "Testdir2.zip")
        # "Testdir2.zip" |> File.exists? |> assert
        assert File.exists? "Testdir2.zip"
        # System.cmd("zip",["-T","Testdir2.zip"])
        # |> tap({result_str, _} ~> result_str)
        # |> String.strip |> "test of Testdir2.zip OK"
        # System.cmd("zipinfo",["-1","Testdir2.zip"])
        # |> tap({result_str2, _} ~> result_str2)
        # |> contains "testdir2"
      after
        File.rm_rf("Testdir2.zip")
      end
    end
  end

  defmodule TestZipOneBitstringPath do
    use ExUnit.Case
    dir = Path.join(fixture_path, "testdir1")
    try do
      Path.join(fixture_path, "Testdir3.zip") |> File.exists? |> refute
      Radpath.zip(dir, "Testdir3.zip")
      # "Testdir3.zip" |> File.exists?
      assert File.exists? "Testdir3.zip"
      # System.cmd("zip",["-T","Testdir3.zip"]) |>
      #           {"test of Testdir3.zip OK\n", 0}
      # System.cmd("zipinfo",["-1","Testdir3.zip"])
      # |> tap({result_str, _} ~> result_str)
      # |> contains "testdir1"
    after
      File.rm_rf("Testdir3.zip")
    end
  end

  defmodule TestUnzipOneBitstringPathInCWD do
    
    use ExUnit.Case
    try do
      Path.join(fixture_path, "dome.csv") |> File.exists? |> refute
      Radpath.unzip(Path.join(fixture_path, "dome.zip"), fixture_path)
      # Path.join(fixture_path, "dome.csv") |> File.exists?
      assert File.exists? Path.join(fixture_path, "dome.csv")
    after
      File.rm_rf(Path.join(fixture_path, "dome.csv"))
    end
  end

  defmodule TestunzipOnebitstringPathIntmp do
  use ExUnit.Case
    try do
      Path.join(fixture_path, "dome.csv") |> File.exists? |> refute
      Radpath.unzip(Path.join(fixture_path, "dome.zip"), "/tmp")
    after
      # Path.join("/tmp", "dome.csv") |> File.exists?
      assert File.exists? Path.join("/tmp", "dome.csv")
  end
  defmodule TestZipPathThatDoesNotExist do
  use ExUnit.Case
    try do
        Path.join(fixture_path, "Testdir-dont-exist.zip") |>
                   File.exists? |> refute 

      rescue
        e in RuntimeError -> e
      end
  end

  defmodule FilteringTest do
