test: use curl --fail
This commit is contained in:
parent
283ad65a10
commit
0274ba6bd0
5 changed files with 17 additions and 7 deletions
|
|
@ -1 +0,0 @@
|
|||
A17JXR3E6J4CXDPYT7S1H25PGJ3ABS26TQ38654QCX0TB59RPMF0
|
||||
|
|
@ -6,9 +6,9 @@ a="/tmp/a.json"
|
|||
b="/tmp/b.json"
|
||||
|
||||
url="http://localhost:3434"
|
||||
auditor_pub=$(<"./test/auditor_public_key")
|
||||
auditor_pub="A17JXR3E6J4CXDPYT7S1H25PGJ3ABS26TQ38654QCX0TB59RPMF0"
|
||||
master_key="./default/master_offline_private_key"
|
||||
zero_euro="EUR:0.0"
|
||||
zero_euro="KUDO:0.0"
|
||||
|
||||
offline_tool() {
|
||||
dune exec offline -- "$@" > /dev/null
|
||||
|
|
|
|||
|
|
@ -48,16 +48,16 @@ let () =
|
|||
let () =
|
||||
let open Amount in
|
||||
let v =
|
||||
make ~sign:(Some Sign_plus) ~currency:"EUR" ~value:(Int64.of_int 25)
|
||||
make ~sign:(Some Sign_plus) ~currency:"KUDO" ~value:(Int64.of_int 25)
|
||||
~fraction:(Int32.of_int 678)
|
||||
|> Result.get_ok
|
||||
in
|
||||
let s = to_string v in
|
||||
let v' = of_string s |> Result.get_ok in
|
||||
assert (v = v');
|
||||
let r = of_string {|~EUR:4.9|} in
|
||||
let r = of_string {|~KUDO:4.9|} in
|
||||
assert (Result.is_error r);
|
||||
let r = of_string {|+EUR:4.99999999999999999999999|} in
|
||||
let r = of_string {|+KUDO:4.99999999999999999999999|} in
|
||||
assert (Result.is_error r);
|
||||
()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue