From 432de1323d26873b000dd5cc245b463dd0809ac3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Wed, 1 Jan 2003 19:14:07 +0100
Subject: [PATCH] New tests for hex and base64 literal output.

Rev: src/nettle/testsuite/sexp-conv-test:1.4
---
 testsuite/sexp-conv-test | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/testsuite/sexp-conv-test b/testsuite/sexp-conv-test
index 625e8784..94202845 100755
--- a/testsuite/sexp-conv-test
+++ b/testsuite/sexp-conv-test
@@ -31,6 +31,22 @@ test_advanced () {
     fi
 }
 
+test_advanced_hex () {
+    echo $n "$1$c" > test.in
+    if ../tools/sexp-conv -s hex <test.in >test1.out ; then
+	true
+    else
+	exit 1
+    fi
+    echo "$2" > test2.out
+
+    if cmp test1.out test2.out ; then
+	true
+    else
+	exit 1;
+    fi
+}
+
 test_transport () {
     echo $n "$1$c" > test.in
     if ../tools/sexp-conv -s transport <test.in >test1.out ; then
@@ -80,6 +96,11 @@ test_advanced '; comment
 
 test_advanced '(foo[bar]foo)' '(foo [bar]foo)'
 
+test_advanced '(#aabb#)' '(|qrs=|)'
+test_advanced '(|qrs=|)' '(|qrs=|)'
+test_advanced_hex '(|qrs=|)' '(#aabb#)'
+test_advanced_hex '(#aabb#)' '(#aabb#)'
+
 test_transport '0:' '{MDo=}'
 test_transport '()' '{KCk=}'
 test_transport 'foo' '{Mzpmb28=}'
-- 
GitLab