From 7c2de4c5e6b7b1184d059057e1d412d6f0133816 Mon Sep 17 00:00:00 2001 From: MS Date: Mon, 27 Jul 2020 12:48:48 +0200 Subject: payto parser: extract 'subject' parameter. --- src/util/test_payto.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/util/test_payto.c') diff --git a/src/util/test_payto.c b/src/util/test_payto.c index 7dc2eb142..c809a0396 100644 --- a/src/util/test_payto.c +++ b/src/util/test_payto.c @@ -22,6 +22,8 @@ #include "taler_util.h" #define CHECK(a,b) do { \ + GNUNET_assert (a != NULL); \ + GNUNET_assert (b != NULL); \ if (0 != strcmp (a,b)) { \ GNUNET_break (0); \ fprintf (stderr, "Got %s, wanted %s\n", b, a); \ @@ -52,6 +54,15 @@ main (int argc, "payto://x-taler-bank/localhost:1080/alice?subject=hello&amount=EUR:1"); CHECK ("alice", r); + + r = TALER_payto_get_subject ( + "payto://x-taler-bank/localhost:1080/alice?subject=hello&amount=EUR:1"); + CHECK ("hello", + r); + + r = TALER_payto_get_subject ( + "payto://x-taler-bank/localhost:1080/alice"); + GNUNET_assert (r == NULL); return 0; } -- cgit v1.2.3