Constant brmember tag, fix tests.
This commit is contained in:
parent
0052dd0b75
commit
287e5fd83b
1 changed files with 10 additions and 3 deletions
|
@ -29,6 +29,8 @@
|
|||
(module
|
||||
brmember
|
||||
(
|
||||
TAG-BRMEMBER
|
||||
|
||||
make-brmember
|
||||
|
||||
brmember-file-name
|
||||
|
@ -88,6 +90,9 @@
|
|||
bank-account
|
||||
util-tag)
|
||||
|
||||
;; Unique tag
|
||||
(define TAG-BRMEMBER (make-tag BRMEMBER))
|
||||
|
||||
;; Checks whether given string is a 4-digit decimal number.
|
||||
(define (is-4digit-string? s)
|
||||
(if (irregex-search (irregex "^[0-9]{4}$") s)
|
||||
|
@ -120,7 +125,7 @@
|
|||
(symbol->string
|
||||
(get-4digit-symbol-from-list (cons file-name symlinks))))))))
|
||||
(if (null? args)
|
||||
(make-ldict (cons (cons 'TAG (make-tag BRMEMBER))
|
||||
(make-ldict (cons (cons 'TAG TAG-BRMEMBER)
|
||||
pairs))
|
||||
(if (not (keyword? (car args)))
|
||||
(error 'make-brmember "Optional arguments must be keywords" (car args))
|
||||
|
@ -358,7 +363,8 @@
|
|||
(ldict-equal?
|
||||
(make-brmember '|1234| "members/1234" '(|member|))
|
||||
(make-ldict
|
||||
'((file-name . |1234|)
|
||||
`((file-name . |1234|)
|
||||
(TAG . ,TAG-BRMEMBER)
|
||||
(file-path . "members/1234")
|
||||
(symlinks |member|)
|
||||
(id . 1234)))))
|
||||
|
@ -366,7 +372,8 @@
|
|||
(ldict-equal?
|
||||
(make-brmember '|1234| "members/1234" '(|member|) #:msg "msg")
|
||||
(make-ldict
|
||||
'((msg . "msg")
|
||||
`((msg . "msg")
|
||||
(TAG . ,TAG-BRMEMBER)
|
||||
(file-name . |1234|)
|
||||
(file-path . "members/1234")
|
||||
(symlinks |member|)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue