[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet-scheme] branch master updated (71910f5 -> 3fd35c6)
From: |
gnunet |
Subject: |
[gnunet-scheme] branch master updated (71910f5 -> 3fd35c6) |
Date: |
Thu, 28 Jul 2022 18:59:41 +0200 |
This is an automated email from the git hooks/post-receive script.
maxime-devos pushed a change to branch master
in repository gnunet-scheme.
from 71910f5 data-string: Add cross-reference to C equivalents.
new ee5b7cc doc/scheme-gnunet.tm: Rename Cryptograph to Miscellaneuous.
new b2deac7 data-string: Test it.
new 3fd35c6 Partially document (gnu gnunet data-string) in the manual.
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
Makefile.am | 1 +
doc/scheme-gnunet.tm | 11 ++++++++++-
tests/data-string.scm | 31 +++++++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 1 deletion(-)
create mode 100644 tests/data-string.scm
diff --git a/Makefile.am b/Makefile.am
index 2346ed3..34a4c0a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -181,6 +181,7 @@ SCM_LOG_DRIVER = \
$(top_srcdir)/build-aux/test-driver.scm
SCM_TESTS = \
+ tests/data-string.scm \
tests/envelope.scm \
tests/error-reporting.scm \
tests/message-handler.scm \
diff --git a/doc/scheme-gnunet.tm b/doc/scheme-gnunet.tm
index 046a965..e0e0491 100644
--- a/doc/scheme-gnunet.tm
+++ b/doc/scheme-gnunet.tm
@@ -240,7 +240,7 @@
<include|cadet.tm>
- <chapter|Cryptography>
+ <chapter|Miscellaneous>
The module <scm|(gnu gnunet crypto)><index|(gnu gnunet crypto)> has a few
small wrappers around procedures from Guile-Gcrypt for performing
@@ -260,6 +260,15 @@
<var|to> and return it.
</explain>
+ The module <scm|(gnu gnunet data-string)><index|(gnu gnunet data-string)>
+ has two procedures <scm|data-\<gtr\>string><index|data-\<gtr\>string> and
+ <scm|string-\<gtr\>data><index|string-\<gtr\>data>, for representing binary
+ data in ASCII with the Crockford Base32 encoding <todo|TODO: convert to
+ slices and document>. They correspond with the
+ <cpp|GNUNET_STRINGS_data_to_string><index|GNUNET_STRINGS_data_to_string>
+ and <cpp|GNUNET_STRINGS_string_to_data><index|GNUNET_STRINGS_string_to_data>
+ functions in the C implementation.
+
<appendix|GNU Free Documentation License>
<include|fdl.tm>
diff --git a/tests/data-string.scm b/tests/data-string.scm
new file mode 100644
index 0000000..e7b6439
--- /dev/null
+++ b/tests/data-string.scm
@@ -0,0 +1,31 @@
+;; This file is part of scheme-GNUnet, a partial Scheme port of GNUnet.
+;; Copyright (C) 2022 GNUnet e.V.
+;;
+;; scheme-GNUnet is free software: you can redistribute it and/or modify it
+;; under the terms of the GNU Affero General Public License as published
+;; by the Free Software Foundation, either version 3 of the License,
+;; or (at your option) any later version.
+;;
+;; scheme-GNUnet is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; Affero General Public License for more details.
+;;
+;; You should have received a copy of the GNU Affero General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;;
+;; SPDX-License-Identifier: AGPL-3.0-or-later
+
+(import (gnu gnunet data-string)
+ (quickcheck arbitrary)
+ (quickcheck property)
+ (quickcheck)
+ (rnrs bytevectors)
+ (srfi srfi-64))
+
+;; TODO: test errors
+(test-assert
+ "data->string + string->data round-trips"
+ (quickcheck
+ (property ((data $bytevector))
+ (equal? data (string->data (data->string data) (bytevector-length
data))))))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet-scheme] branch master updated (71910f5 -> 3fd35c6),
gnunet <=