|
59 | 59 | (is (= bbin-test-lib-private out)) |
60 | 60 | (is (fs/exists? bin-file)) |
61 | 61 | (is (= "Hello world!" (tu/run-bin-script 'hello)))))) |
62 | | -; |
63 | | -;(def git-http-url-lib |
64 | | -; '{:lib org.babashka.bbin/script-1039504783-https-github-com-rads-bbin-test-lib-git |
65 | | -; :coords {:git/url "https://github.com/rads/bbin-test-lib.git" |
66 | | -; :git/sha "cefb15e3320dd4c599e8be62f7a01a00b07e2e72"}}) |
67 | | -; |
68 | | -;(deftest install-from-git-http-url-test |
69 | | -; (testing "install https://*.git" |
70 | | -; (tu/reset-test-dir) |
71 | | -; (dirs/ensure-bbin-dirs {}) |
72 | | -; (let [cli-opts {:script/lib (get-in git-http-url-lib [:coords :git/url])} |
73 | | -; out (tu/run-install cli-opts) |
74 | | -; bin-file (fs/file (dirs/bin-dir nil) "hello")] |
75 | | -; (is (= git-http-url-lib out)) |
76 | | -; (is (fs/exists? bin-file)) |
77 | | -; (is (= "Hello world!" (tu/run-bin-script 'hello)))))) |
78 | | -; |
79 | | -;(def git-ssh-url-lib |
80 | | -; '{:lib org.babashka.bbin/script-1166637990-git-bitbucket-org-radsmith-bbin-test-lib-private-git |
81 | | -; :coords {:git/url "git@bitbucket.org:radsmith/bbin-test-lib-private.git" |
82 | | -; :git/sha "cefb15e3320dd4c599e8be62f7a01a00b07e2e72"}}) |
83 | | -; |
84 | | -;(deftest install-from-git-ssh-url-test |
85 | | -; (testing "install git@*:*.git" |
86 | | -; (tu/reset-test-dir) |
87 | | -; (dirs/ensure-bbin-dirs {}) |
88 | | -; (let [cli-opts {:script/lib (get-in git-ssh-url-lib [:coords :git/url])} |
89 | | -; out (tu/run-install cli-opts) |
90 | | -; bin-file (fs/file (dirs/bin-dir nil) "hello")] |
91 | | -; (is (= git-ssh-url-lib out)) |
92 | | -; (is (fs/exists? bin-file)) |
93 | | -; (is (= "Hello world!" (tu/run-bin-script 'hello)))))) |
| 62 | + |
| 63 | +(def git-http-url-lib |
| 64 | + '{:lib org.babashka.bbin/script-1039504783-https-github-com-rads-bbin-test-lib-git |
| 65 | + :coords {:git/url "https://github.com/rads/bbin-test-lib.git" |
| 66 | + :git/sha "cefb15e3320dd4c599e8be62f7a01a00b07e2e72"}}) |
| 67 | + |
| 68 | +(deftest install-from-git-http-url-test |
| 69 | + (testing "install https://*.git" |
| 70 | + (tu/reset-test-dir) |
| 71 | + (dirs/ensure-bbin-dirs {}) |
| 72 | + (let [cli-opts {:script/lib (get-in git-http-url-lib [:coords :git/url])} |
| 73 | + out (tu/run-install cli-opts) |
| 74 | + bin-file (fs/file (dirs/bin-dir nil) "hello")] |
| 75 | + (is (= git-http-url-lib out)) |
| 76 | + (is (fs/exists? bin-file)) |
| 77 | + (is (= "Hello world!" (tu/run-bin-script 'hello)))))) |
| 78 | + |
| 79 | +(def git-ssh-url-lib |
| 80 | + '{:lib org.babashka.bbin/script-1166637990-git-bitbucket-org-radsmith-bbin-test-lib-private-git |
| 81 | + :coords {:git/url "git@bitbucket.org:radsmith/bbin-test-lib-private.git" |
| 82 | + :git/sha "cefb15e3320dd4c599e8be62f7a01a00b07e2e72"}}) |
| 83 | + |
| 84 | +(deftest install-from-git-ssh-url-test |
| 85 | + (testing "install git@*:*.git" |
| 86 | + (tu/reset-test-dir) |
| 87 | + (dirs/ensure-bbin-dirs {}) |
| 88 | + (let [cli-opts {:script/lib (get-in git-ssh-url-lib [:coords :git/url])} |
| 89 | + out (tu/run-install cli-opts) |
| 90 | + bin-file (fs/file (dirs/bin-dir nil) "hello")] |
| 91 | + (is (= git-ssh-url-lib out)) |
| 92 | + (is (fs/exists? bin-file)) |
| 93 | + (is (= "Hello world!" (tu/run-bin-script 'hello)))))) |
94 | 94 |
|
95 | 95 | (defn read-all |
96 | 96 | [file] |
|
0 commit comments