summaryrefslogtreecommitdiff
path: root/src/util/test_payto.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-27 14:14:07 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-27 14:14:40 +0200
commit022fba51d569826a376f517e5ee3302222e7470c (patch)
tree68f207fa39a6d9c9681768be3d460a1cc2202762 /src/util/test_payto.c
parentccdbc2a4526c5f8750cdce2180b4d5f481d264b4 (diff)
parent6fd44ff2ea8f86655ac6450efd88da85b48211cf (diff)
downloadexchange-022fba51d569826a376f517e5ee3302222e7470c.tar.gz
exchange-022fba51d569826a376f517e5ee3302222e7470c.tar.bz2
exchange-022fba51d569826a376f517e5ee3302222e7470c.zip
better fix
Diffstat (limited to 'src/util/test_payto.c')
-rw-r--r--src/util/test_payto.c11
1 files changed, 11 insertions, 0 deletions
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;
}