1 USING: io.directories io.files.links tools.test sequences
2 io.files.unique tools.files fry math kernel math.parser
3 io.pathnames namespaces ;
4 IN: io.files.links.tests
6 : make-test-links ( n path -- )
7 [ '[ [ 1+ ] keep [ number>string _ prepend ] bi@ make-link ] each ]
8 [ [ number>string ] dip prepend touch-file ] 2bi ; inline
12 5 "lol" make-test-links
14 current-directory get "lol5" append-path =
15 ] with-unique-directory
20 100 "laf" make-test-links "laf1" follow-links
21 ] with-unique-directory
22 ] [ too-many-symlinks? ] must-fail-with
27 100 "laf" make-test-links
29 current-directory get "laf100" append-path =
30 ] with-unique-directory