blob: 3ac1e2cfb49c482d515bb54b91fd3aae8020289c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
set path /tmp/$DIRNAME/$TESTNAME
function setup
mkdir -p $path/temp1/temp2/temp3
cd $path/temp1/temp2/temp3
end
function teardown
rm -rf $path
end
test "Truncate path to 1 directory"
'temp3' = (
__sf_util_truncate_dir (pwd) 1
)
end
test "Truncate path to 3 directories"
'temp1/temp2/temp3' = (
__sf_util_truncate_dir (pwd) 3
)
end
test "Don't truncate path"
(pwd) = (
__sf_util_truncate_dir (pwd) 0
)
end
|