Add java.lang.Byte, test bencode from source
This commit is contained in:
parent
3bf27445f3
commit
c738398eea
5 changed files with 22 additions and 0 deletions
|
|
@ -227,6 +227,7 @@ enumerated explicitly.
|
||||||
- [`clojure.data.csv`](https://github.com/clojure/data.csv) aliased as `csv`
|
- [`clojure.data.csv`](https://github.com/clojure/data.csv) aliased as `csv`
|
||||||
- [`cheshire.core`](https://github.com/dakrone/cheshire) aliased as `json`
|
- [`cheshire.core`](https://github.com/dakrone/cheshire) aliased as `json`
|
||||||
- [`cognitect.transit`](https://github.com/cognitect/transit-clj) aliased as `transit`
|
- [`cognitect.transit`](https://github.com/cognitect/transit-clj) aliased as `transit`
|
||||||
|
- [`bencode.core`](https://github.com/nrepl/bencode) aliased as `bencode`: `read-bencode`, `write-bencode`.
|
||||||
|
|
||||||
A selection of java classes are available, see `babashka/impl/classes.clj`.
|
A selection of java classes are available, see `babashka/impl/classes.clj`.
|
||||||
|
|
||||||
|
|
|
||||||
18
script/lib_tests/bencode_test
Executable file
18
script/lib_tests/bencode_test
Executable file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eou pipefail
|
||||||
|
|
||||||
|
export BABASHKA_CLASSPATH=$(clojure -Sdeps '{:deps {borkdude/bencode {:git/url "https://github.com/borkdude/bencode" :sha "fc2bd007fee318cb04fdb9e0844e69d42cacaf36" :deps/manifest :deps}}}' -Spath)
|
||||||
|
|
||||||
|
ENV=${BABASHKA_TEST_ENV:-}
|
||||||
|
|
||||||
|
if [ "$ENV" = "native" ]; then
|
||||||
|
BB_CMD="./bb"
|
||||||
|
else
|
||||||
|
BB_CMD="lein bb"
|
||||||
|
fi
|
||||||
|
|
||||||
|
$BB_CMD -e "
|
||||||
|
(require '[bencode.core :as bencode] :reload-all)
|
||||||
|
(with-open [os (java.io.ByteArrayOutputStream.)] (bencode/write-bencode os {\"greeting\" \"Good morning\"}) (str os))
|
||||||
|
"
|
||||||
|
|
@ -11,3 +11,4 @@ script/lib_tests/medley_test
|
||||||
script/lib_tests/babashka_curl_test
|
script/lib_tests/babashka_curl_test
|
||||||
script/lib_tests/cprop_test
|
script/lib_tests/cprop_test
|
||||||
script/lib_tests/comb_test
|
script/lib_tests/comb_test
|
||||||
|
script/lib_tests/bencode_test
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
java.lang.ArithmeticException
|
java.lang.ArithmeticException
|
||||||
java.lang.AssertionError
|
java.lang.AssertionError
|
||||||
java.lang.Boolean
|
java.lang.Boolean
|
||||||
|
java.lang.Byte
|
||||||
java.lang.Class
|
java.lang.Class
|
||||||
java.lang.Double
|
java.lang.Double
|
||||||
java.lang.Exception
|
java.lang.Exception
|
||||||
|
|
|
||||||
|
|
@ -357,6 +357,7 @@ Everything after that is bound to *command-line-args*."))
|
||||||
:imports '{ArithmeticException java.lang.ArithmeticException
|
:imports '{ArithmeticException java.lang.ArithmeticException
|
||||||
AssertionError java.lang.AssertionError
|
AssertionError java.lang.AssertionError
|
||||||
Boolean java.lang.Boolean
|
Boolean java.lang.Boolean
|
||||||
|
Byte java.lang.Byte
|
||||||
Class java.lang.Class
|
Class java.lang.Class
|
||||||
Double java.lang.Double
|
Double java.lang.Double
|
||||||
Exception java.lang.Exception
|
Exception java.lang.Exception
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue