aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorgabrielgio <gabriel.giovanini@pm.me>2022-03-25 16:24:46 +0100
committergabrielgio <gabriel.giovanini@pm.me>2022-03-25 16:24:46 +0100
commitdf46e401bd3dac1162cace8e9259ddaba02d5332 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /test
parent2db3d88503fbe219e99c464c4cc8e768613e1359 (diff)
downloadgenpass-df46e401bd3dac1162cace8e9259ddaba02d5332.tar.gz
genpass-df46e401bd3dac1162cace8e9259ddaba02d5332.tar.bz2
genpass-df46e401bd3dac1162cace8e9259ddaba02d5332.zip
ref: Remove all clojure related Files
Making room for wasm project.
Diffstat (limited to 'test')
-rw-r--r--test/genpass/gen_test.clj26
1 files changed, 0 insertions, 26 deletions
diff --git a/test/genpass/gen_test.clj b/test/genpass/gen_test.clj
deleted file mode 100644
index 3bc62e1..0000000
--- a/test/genpass/gen_test.clj
+++ /dev/null
@@ -1,26 +0,0 @@
-(ns genpass.gen-test
- (:require [clojure.test :refer :all]
- [genpass.gen :refer :all]))
-
-(def valid-char-regex #"^[a-zA-Z0-9\!\@\#\%\^\&\*\(\)\{\}\[\]\-\+\=\~]*$")
-(def not-nil? (complement nil?))
-
-(deftest rand-char-test
- (testing "check if return a valid char"
- (is (some (partial = (rand-char)) all-char))
- (is (some (partial = (rand-char)) all-char))
- (is (some (partial = (rand-char)) all-char))))
-
-(deftest genpwd-test
- (testing "check it return 12 chars by defaul"
- (is (= 12 (count (genpwd)))))
- (testing "check it return x chars"
- (is (= 12 (count (genpwd 12))))
- (is (= 0 (count (genpwd 0))))
- (is (= 1 (count (genpwd 1))))
- (is (= 1000 (count (genpwd 1000)))))
- (testing "check if generate valid chars"
- (is (not-nil? (re-matches valid-char-regex (genpwd))))
- (is (not-nil? (re-matches valid-char-regex (genpwd 1))))
- (is (not-nil? (re-matches valid-char-regex (genpwd 1000))))
- (is (not-nil? (re-matches valid-char-regex (genpwd 4)))))) \ No newline at end of file