Sha256: 02a3a7717d6f75167247c933331623285e16783e1a88266fa132cd490190f635

Contents?: true

Size: 1.03 KB

Versions: 396

Compression:

Stored size: 1.03 KB

Contents

(ns etl-test
  (:require [clojure.test :refer [deftest is]]
            etl))

(deftest transform-one-value
  (is (= {"world" 1}
         (etl/transform {1 ["WORLD"]}))))

(deftest transform-more-values
  (is (= {"world" 1 "gschoolers" 1}
         (etl/transform {1 ["WORLD" "GSCHOOLERS"]}))))

(deftest more-keys
  (is (= {"apple" 1 "artichoke" 1 "boat" 2 "ballerina" 2}
         (etl/transform {1 ["APPLE" "ARTICHOKE"], 2 ["BOAT" "BALLERINA"]}))))

(deftest full-dataset
  (is (= {"a"  1 "b"  3 "c" 3 "d" 2 "e" 1
          "f"  4 "g"  2 "h" 4 "i" 1 "j" 8
          "k"  5 "l"  1 "m" 3 "n" 1 "o" 1
          "p"  3 "q" 10 "r" 1 "s" 1 "t" 1
          "u"  1 "v"  4 "w" 4 "x" 8 "y" 4
          "z" 10}
         (etl/transform {1  (re-seq #"\w" "AEIOULNRST")
                         2  (re-seq #"\w" "DG")
                         3  (re-seq #"\w" "BCMP")
                         4  (re-seq #"\w" "FHVWY")
                         5  (re-seq #"\w" "K")
                         8  (re-seq #"\w" "JX")
                         10 (re-seq #"\w" "QZ")}))))

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.179 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.178 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.177 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.176 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.175 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.174 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.173 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.172 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.171 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.170 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.169 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.167 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.166 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.165 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.164 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.163 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.162 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.161 tracks/clojure/exercises/etl/test/etl_test.clj
trackler-2.2.1.160 tracks/clojure/exercises/etl/test/etl_test.clj