add path manipulation functions
This commit is contained in:
parent
a711b32730
commit
3b1ae0efd5
3 changed files with 24 additions and 2 deletions
|
|
@ -67,6 +67,21 @@
|
|||
(quote
|
||||
(not (contains? (1 2 3) 4))))
|
||||
|
||||
('get-paths properly splits path into segments'
|
||||
(quote
|
||||
(let ((PATH "/seg1:/seg2")
|
||||
(split-path (get-paths)))
|
||||
(and (eq? (len split-path) 2)
|
||||
(contains? split-path "/seg1")
|
||||
(contains? split-path "/seg2")))))
|
||||
|
||||
('add-path properly adds a new path segment to PATH'
|
||||
(quote
|
||||
(let ((PATH "/seg1:/seg2")
|
||||
(new-path "/seg3"))
|
||||
(add-path new-path)
|
||||
(contains? (get-paths) new-path))))
|
||||
|
||||
;; add more test cases here
|
||||
))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue