 
 (defn my-data-3 []
   (->>
-    (pig/load-tsv "example/input.tsv")
+    (pig/load-tsv "build/readme-test/input.tsv")
     (pig/map (fn [[a b c]]
                {:sum (+ (Integer/valueOf a) (Integer/valueOf b))
                 :name c}))

           [{:sum 3, :name "foo"}]))))

(deftest test-write-script2
  (pig/write-script "example/my-script.pig" (my-query "example/input.tsv" "example/output.clj")))

(deftest test-join
  (let [left  (pig/return [{:a 1 :b 2} {:a 1 :b 3} {:a 2 :b 4}])

           [[1 [2 3] ["foo"]]
            [2 [4]   ["bar" "baz"]]]))))

(spit "build/readme-test/numbers0.tsv" "1\t1\n2\t5")
(spit "build/readme-test/numbers1.tsv" "1\t2\n2\t6")
(spit "build/readme-test/numbers2.tsv" "1\t3\n2\t7")
(spit "build/readme-test/numbers3.tsv" "1\t4\n2\t8")

(deftest test-names

  (let [a (pig/load-pig "build/readme-test/numbers0.tsv" [i w])
        b (pig/load-pig "build/readme-test/numbers1.tsv" [i x])
        c (pig/load-pig "build/readme-test/numbers2.tsv" [i y])
        d (pig/load-pig "build/readme-test/numbers3.tsv" [i z])

        j0 (pig/join (a on :i)
                     (b on :i)
