mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-30 16:17:02 +01:00
gpgscm: Move 'trace' and 'stringify'.
* tests/gpgscm/tests.scm (trace, stringify): Move... * tests/gpgscm/lib.scm: ... here. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
245860ecaf
commit
f03d6897be
@ -29,6 +29,18 @@
|
||||
(assert #t)
|
||||
(assert (not #f))
|
||||
|
||||
;; Trace displays and returns the given value. A debugging aid.
|
||||
(define (trace x)
|
||||
(display x)
|
||||
(newline)
|
||||
x)
|
||||
|
||||
;; Stringification.
|
||||
(define (stringify expression)
|
||||
(let ((p (open-output-string)))
|
||||
(write expression p)
|
||||
(get-output-string p)))
|
||||
|
||||
(define (filter pred lst)
|
||||
(cond ((null? lst) '())
|
||||
((pred (car lst))
|
||||
|
@ -17,18 +17,6 @@
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;; Trace displays and returns the given value. A debugging aid.
|
||||
(define (trace x)
|
||||
(display x)
|
||||
(newline)
|
||||
x)
|
||||
|
||||
;; Stringification.
|
||||
(define (stringify expression)
|
||||
(let ((p (open-output-string)))
|
||||
(write expression p)
|
||||
(get-output-string p)))
|
||||
|
||||
;; Reporting.
|
||||
(define (echo . msg)
|
||||
(for-each (lambda (x) (display x) (display " ")) msg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user