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.unix.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 current-temporary-directory get [
13 5 "lol" make-test-links
15 current-temporary-directory get "lol5" append-path =
17 ] cleanup-unique-directory
22 current-temporary-directory get [
23 100 "laf" make-test-links "laf1" follow-links
25 ] with-unique-directory
26 ] [ too-many-symlinks? ] must-fail-with
31 current-temporary-directory get [
32 100 "laf" make-test-links
34 current-temporary-directory get "laf100" append-path =
36 ] cleanup-unique-directory