Megatest

Diff
Login

Differences From Artifact [f12a485793]:

To Artifact [4d512f0590]:


1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
;; pretend to be a config file processor
(use posix srfi-69)

(define getenv get-environment-variable)
(define (print-hash-table ht)
  (print "ht=" (hash-table->alist ht)))

(define cfgdata  (conc "(use simple-md5)"

		       "(hash-table-set! ht \"PATH\" (getenv \"PATH\"))"
		       "(hash-table-set! ht \"currdir\" (current-directory))"
		       "(hash-table-set! ht \"md5sum\" (string->md5sum \"Hello\"))"))

(define (faux-cfg-processor ht cfgdata)
  (let* ((proc-str (conc "(lambda (ht)" cfgdata ")")))
    (with-input-from-string proc-str



|




>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
;; pretend to be a config file processor
(use posix srfi-69)

;; (define getenv get-environment-variable)
(define (print-hash-table ht)
  (print "ht=" (hash-table->alist ht)))

(define cfgdata  (conc "(use simple-md5)"
		       "(set! getenv get-environment-variable)"
		       "(hash-table-set! ht \"PATH\" (getenv \"PATH\"))"
		       "(hash-table-set! ht \"currdir\" (current-directory))"
		       "(hash-table-set! ht \"md5sum\" (string->md5sum \"Hello\"))"))

(define (faux-cfg-processor ht cfgdata)
  (let* ((proc-str (conc "(lambda (ht)" cfgdata ")")))
    (with-input-from-string proc-str