mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-16 18:50:23 +02:00
("set-source-property!"): Two new tests.
This commit is contained in:
parent
8a5f4a307f
commit
99f7ecf744
2 changed files with 25 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2005-06-07 Neil Jerram <neil@ossau.uklinux.net>
|
||||
|
||||
* tests/srcprop.test ("set-source-property!"): Two new tests.
|
||||
|
||||
2005-06-06 Kevin Ryde <user42@zip.com.au>
|
||||
|
||||
* tests/strings.test (string-split): Try splitting on an 8-bit char.
|
||||
|
|
|
@ -78,3 +78,24 @@
|
|||
(let ((t (cons 3 4)))
|
||||
(set-source-properties! t (source-properties s))
|
||||
(not (null? (source-properties t))))))))
|
||||
|
||||
;;;
|
||||
;;; set-source-property!
|
||||
;;;
|
||||
|
||||
(with-test-prefix "set-source-property!"
|
||||
(read-enable 'positions)
|
||||
(let ((s (read (open-input-string "(display \"\")"))))
|
||||
|
||||
(pass-if "set-source-property! before eval"
|
||||
(set-source-property! s 'test-sym 10)
|
||||
(eval s the-scm-module)
|
||||
#t)
|
||||
|
||||
(pass-if "set-source-property! after eval"
|
||||
(hash-fold (lambda (x props acc)
|
||||
(if (eq? (source-property x 'test-sym) 10)
|
||||
(set-source-property! x 'test-sym 11)))
|
||||
0
|
||||
source-whash)
|
||||
#t)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue