libpath-ruby 0.2.2 → 0.2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +33 -0
- data/README.md +25 -8
- data/examples/path_from_arg0.md +43 -43
- data/examples/path_from_arg0.rb +25 -23
- data/lib/libpath/constants/unix.rb +71 -71
- data/lib/libpath/constants/windows.rb +72 -72
- data/lib/libpath/constants.rb +18 -19
- data/lib/libpath/diagnostics/parameter_checking.rb +25 -25
- data/lib/libpath/diagnostics.rb +1 -1
- data/lib/libpath/exceptions/libpath_base_exception.rb +13 -13
- data/lib/libpath/exceptions/malformed_name_exception.rb +23 -22
- data/lib/libpath/exceptions.rb +1 -1
- data/lib/libpath/form/unix.rb +104 -103
- data/lib/libpath/form/windows.rb +200 -199
- data/lib/libpath/form.rb +18 -18
- data/lib/libpath/internal_/array.rb +53 -53
- data/lib/libpath/internal_/platform.rb +24 -24
- data/lib/libpath/internal_/string.rb +18 -18
- data/lib/libpath/internal_/unix/form.rb +116 -116
- data/lib/libpath/internal_/windows/drive.rb +59 -59
- data/lib/libpath/internal_/windows/form.rb +189 -189
- data/lib/libpath/libpath.rb +3 -0
- data/lib/libpath/path/unix.rb +114 -112
- data/lib/libpath/path/windows.rb +120 -118
- data/lib/libpath/path.rb +18 -20
- data/lib/libpath/util/unix.rb +258 -258
- data/lib/libpath/util/windows.rb +400 -400
- data/lib/libpath/util.rb +18 -19
- data/lib/libpath/version.rb +23 -24
- data/lib/libpath.rb +1 -1
- data/test/performance/benchmark_drive_letter.rb +50 -10
- data/test/performance/benchmark_gsub_string_or_regex.rb +27 -23
- data/test/performance/benchmark_rindex2.rb +56 -48
- data/test/performance/benchmark_split.rb +16 -10
- data/test/unit/compare/ts_all.rb +4 -4
- data/test/unit/equate/ts_all.rb +4 -4
- data/test/unit/equate/unix/ts_all.rb +4 -4
- data/test/unit/equate/windows/ts_all.rb +4 -4
- data/test/unit/exceptions/tc_libpath_base_exception.rb +10 -8
- data/test/unit/exceptions/tc_malformed_name_exception.rb +14 -12
- data/test/unit/exceptions/ts_all.rb +4 -4
- data/test/unit/form/tc_absolute_functions.rb +242 -240
- data/test/unit/form/ts_all.rb +4 -4
- data/test/unit/form/unix/tc_absolute_functions.rb +158 -155
- data/test/unit/form/unix/ts_all.rb +4 -4
- data/test/unit/form/windows/tc_absolute_functions.rb +628 -625
- data/test/unit/form/windows/ts_all.rb +4 -4
- data/test/unit/internal_/tc_array.rb +36 -32
- data/test/unit/internal_/ts_all.rb +4 -4
- data/test/unit/internal_/unix/form/tc_slash_functions.rb +38 -35
- data/test/unit/internal_/unix/form/ts_all.rb +4 -4
- data/test/unit/internal_/unix/tc_split_path.rb +387 -384
- data/test/unit/internal_/unix/ts_all.rb +4 -4
- data/test/unit/internal_/windows/form/tc_get_windows_volume.rb +157 -153
- data/test/unit/internal_/windows/form/tc_slash_functions.rb +39 -35
- data/test/unit/internal_/windows/form/ts_all.rb +4 -4
- data/test/unit/internal_/windows/tc_split_path.rb +874 -869
- data/test/unit/internal_/windows/ts_all.rb +4 -4
- data/test/unit/parse/ts_all.rb +4 -4
- data/test/unit/path/tc_path.rb +732 -732
- data/test/unit/path/ts_all.rb +4 -4
- data/test/unit/path/unix/tc_path.rb +544 -540
- data/test/unit/path/unix/ts_all.rb +4 -4
- data/test/unit/path/windows/tc_path.rb +608 -603
- data/test/unit/path/windows/ts_all.rb +4 -4
- data/test/unit/tc_version.rb +25 -22
- data/test/unit/ts_all.rb +4 -4
- data/test/unit/util/tc_combine_paths.rb +110 -105
- data/test/unit/util/tc_derive_relative_path.rb +8 -3
- data/test/unit/util/tc_make_path_canonical.rb +142 -138
- data/test/unit/util/ts_all.rb +4 -4
- data/test/unit/util/unix/tc_combine_paths.rb +38 -34
- data/test/unit/util/unix/tc_derive_relative_path.rb +80 -75
- data/test/unit/util/unix/tc_make_path_absolute.rb +74 -70
- data/test/unit/util/unix/tc_make_path_canonical.rb +95 -90
- data/test/unit/util/unix/ts_all.rb +4 -4
- data/test/unit/util/windows/tc_combine_paths.rb +82 -77
- data/test/unit/util/windows/tc_derive_relative_path.rb +98 -93
- data/test/unit/util/windows/tc_make_path_absolute.rb +105 -101
- data/test/unit/util/windows/tc_make_path_canonical.rb +158 -153
- data/test/unit/util/windows/ts_all.rb +4 -4
- metadata +9 -8
@@ -2,227 +2,231 @@
|
|
2
2
|
|
3
3
|
$:.unshift File.join(File.dirname(__FILE__), *(['..'] * 3), 'lib')
|
4
4
|
|
5
|
+
|
5
6
|
require 'libpath/util'
|
6
7
|
|
7
8
|
require 'test/unit'
|
8
9
|
|
9
10
|
require 'libpath/internal_/platform'
|
10
11
|
|
12
|
+
|
11
13
|
class Test_LibPath_Util_make_path_canonical_via_extend < Test::Unit::TestCase
|
12
14
|
|
13
|
-
|
15
|
+
F = ::LibPath::Util
|
14
16
|
|
15
|
-
|
17
|
+
def test_empty
|
16
18
|
|
17
|
-
|
18
|
-
|
19
|
+
assert_equal '', F.make_path_canonical('')
|
20
|
+
end
|
19
21
|
|
20
|
-
|
22
|
+
def test_root
|
21
23
|
|
22
|
-
|
24
|
+
assert_equal '/', F.make_path_canonical('/')
|
23
25
|
|
24
|
-
|
26
|
+
if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then
|
25
27
|
|
26
|
-
|
27
|
-
|
28
|
+
assert_equal '\\', F.make_path_canonical('//')
|
29
|
+
else
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
|
31
|
+
assert_equal '/', F.make_path_canonical('//')
|
32
|
+
end
|
33
|
+
end
|
32
34
|
|
33
|
-
|
35
|
+
def test_one_dot
|
34
36
|
|
35
|
-
|
37
|
+
if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then
|
36
38
|
|
37
|
-
|
39
|
+
assert_equal '.\\', F.make_path_canonical('.')
|
38
40
|
|
39
|
-
|
40
|
-
|
41
|
+
assert_equal '.\\', F.make_path_canonical('.\\')
|
42
|
+
assert_equal '.\\', F.make_path_canonical('.\\', make_slashes_canonical: true)
|
41
43
|
|
42
|
-
|
43
|
-
|
44
|
-
|
44
|
+
assert_equal './', F.make_path_canonical('./')
|
45
|
+
assert_equal '.\\', F.make_path_canonical('.\\', make_slashes_canonical: true)
|
46
|
+
else
|
45
47
|
|
46
|
-
|
48
|
+
assert_equal './', F.make_path_canonical('.')
|
47
49
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
50
|
+
assert_equal './', F.make_path_canonical('./')
|
51
|
+
assert_equal './', F.make_path_canonical('./', make_slashes_canonical: true)
|
52
|
+
end
|
53
|
+
end
|
52
54
|
|
53
|
-
|
55
|
+
def test_two_dots
|
54
56
|
|
55
|
-
|
57
|
+
if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then
|
56
58
|
|
57
|
-
|
58
|
-
|
59
|
-
|
59
|
+
assert_equal '..\\', F.make_path_canonical('..')
|
60
|
+
assert_equal '..\\', F.make_path_canonical('..//')
|
61
|
+
assert_equal '../', F.make_path_canonical('../')
|
60
62
|
|
61
|
-
|
62
|
-
|
63
|
+
assert_equal '/dir.14/', F.make_path_canonical('/dir.14/dir.2/..')
|
64
|
+
assert_equal 'dir.14/', F.make_path_canonical('dir.14/dir.2/..')
|
63
65
|
|
64
|
-
|
65
|
-
|
66
|
-
|
66
|
+
assert_equal '/', F.make_path_canonical('/dir.14/dir.2/../..')
|
67
|
+
assert_equal '/', F.make_path_canonical('/dir.14/dir.2/../../..')
|
68
|
+
assert_equal '.\\', F.make_path_canonical('dir.14/dir.2/../..')
|
67
69
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
70
|
+
assert_equal '\\', F.make_path_canonical('\\dir.14\\dir.2\\..\\..')
|
71
|
+
assert_equal '\\', F.make_path_canonical('\\dir.14\\dir.2\\..\\..\\..')
|
72
|
+
assert_equal '.\\', F.make_path_canonical('dir.14\\dir.2\\..\\..')
|
73
|
+
else
|
72
74
|
|
73
|
-
|
74
|
-
|
75
|
+
assert_equal '../', F.make_path_canonical('..')
|
76
|
+
assert_equal '../', F.make_path_canonical('../')
|
75
77
|
|
76
|
-
|
77
|
-
|
78
|
+
assert_equal '/dir.14/', F.make_path_canonical('/dir.14/dir.2/..')
|
79
|
+
assert_equal 'dir.14/', F.make_path_canonical('dir.14/dir.2/..')
|
78
80
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
81
|
+
assert_equal '/', F.make_path_canonical('/dir.14/dir.2/../..')
|
82
|
+
assert_equal '/', F.make_path_canonical('/dir.14/dir.2/../../..')
|
83
|
+
assert_equal './', F.make_path_canonical('dir.14/dir.2/../..')
|
84
|
+
end
|
83
85
|
|
84
|
-
|
86
|
+
end
|
85
87
|
|
86
|
-
|
88
|
+
def test_redundant_slashes
|
87
89
|
|
88
|
-
|
90
|
+
if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then
|
89
91
|
|
90
|
-
|
91
|
-
|
92
|
+
assert_equal '.\\', F.make_path_canonical('.//')
|
93
|
+
assert_equal '.\\', F.make_path_canonical('.\\\\')
|
92
94
|
|
93
|
-
|
94
|
-
|
95
|
+
assert_equal '..\\', F.make_path_canonical('..//')
|
96
|
+
else
|
95
97
|
|
96
|
-
|
98
|
+
assert_equal './', F.make_path_canonical('.//')
|
97
99
|
|
98
|
-
|
99
|
-
|
100
|
-
|
100
|
+
assert_equal '../', F.make_path_canonical('..//')
|
101
|
+
end
|
102
|
+
end
|
101
103
|
|
102
|
-
|
104
|
+
def test_basenames
|
103
105
|
|
104
|
-
|
106
|
+
assert_equal 'a', F.make_path_canonical('a')
|
105
107
|
|
106
|
-
|
107
|
-
|
108
|
+
assert_equal 'file.ext', F.make_path_canonical('file.ext')
|
109
|
+
end
|
108
110
|
|
109
|
-
|
111
|
+
def test_trailing_dots
|
110
112
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
113
|
+
assert_equal 'a.', F.make_path_canonical('a.')
|
114
|
+
assert_equal 'a.', F.make_path_canonical('./a.')
|
115
|
+
assert_equal 'a.', F.make_path_canonical('././././a.')
|
116
|
+
assert_equal 'a.', F.make_path_canonical('abc/../a.')
|
115
117
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
118
|
+
assert_equal 'a..', F.make_path_canonical('a..')
|
119
|
+
assert_equal 'a..', F.make_path_canonical('./a..')
|
120
|
+
assert_equal 'a..', F.make_path_canonical('././././a..')
|
121
|
+
assert_equal 'a..', F.make_path_canonical('abc/../a..')
|
122
|
+
assert_equal 'a..', F.make_path_canonical('abc//../a..')
|
121
123
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
124
|
+
assert_equal 'a...', F.make_path_canonical('a...')
|
125
|
+
assert_equal 'a...', F.make_path_canonical('./a...')
|
126
|
+
assert_equal 'a...', F.make_path_canonical('././././a...')
|
127
|
+
assert_equal 'a...', F.make_path_canonical('abc/../a...')
|
126
128
|
|
127
|
-
|
129
|
+
if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then
|
128
130
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
131
|
+
assert_equal 'a.', F.make_path_canonical('a.')
|
132
|
+
assert_equal 'a.', F.make_path_canonical('.\\a.')
|
133
|
+
assert_equal 'a.', F.make_path_canonical('.\\.\\.\\.\\a.')
|
134
|
+
assert_equal 'a.', F.make_path_canonical('abc\\..\\a.')
|
133
135
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
136
|
+
assert_equal 'a..', F.make_path_canonical('a..')
|
137
|
+
assert_equal 'a..', F.make_path_canonical('.\\a..')
|
138
|
+
assert_equal 'a..', F.make_path_canonical('.\\.\\.\\.\\a..')
|
139
|
+
assert_equal 'a..', F.make_path_canonical('abc\\..\\a..')
|
138
140
|
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
141
|
+
assert_equal 'a...', F.make_path_canonical('a...')
|
142
|
+
assert_equal 'a...', F.make_path_canonical('.\\a...')
|
143
|
+
assert_equal 'a...', F.make_path_canonical('.\\.\\.\\.\\a...')
|
144
|
+
assert_equal 'a...', F.make_path_canonical('abc\\..\\a...')
|
145
|
+
end
|
146
|
+
end
|
145
147
|
|
146
|
-
|
148
|
+
def test_one_dots_directory
|
147
149
|
|
148
|
-
|
150
|
+
assert_equal 'abc', F.make_path_canonical('./abc')
|
149
151
|
|
150
|
-
|
151
|
-
|
152
|
-
|
152
|
+
assert_equal 'abc', F.make_path_canonical('././abc')
|
153
|
+
assert_equal 'abc', F.make_path_canonical('././/abc')
|
154
|
+
assert_equal 'abc', F.make_path_canonical('././//////////////////abc')
|
153
155
|
|
154
|
-
|
156
|
+
assert_equal 'abc', F.make_path_canonical('./././././././././abc')
|
155
157
|
|
156
|
-
|
158
|
+
assert_equal 'abc/', F.make_path_canonical('abc/./')
|
157
159
|
|
158
|
-
|
160
|
+
assert_equal 'abc/', F.make_path_canonical('./abc/./')
|
159
161
|
|
160
|
-
|
162
|
+
if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then
|
161
163
|
|
162
|
-
|
164
|
+
assert_equal 'abc', F.make_path_canonical('.\\abc')
|
163
165
|
|
164
|
-
|
166
|
+
assert_equal 'abc', F.make_path_canonical('.\\.\\abc')
|
165
167
|
|
166
|
-
|
168
|
+
assert_equal 'abc', F.make_path_canonical('.\\.\\.\\.\\.\\.\\.\\.\\.\\abc')
|
167
169
|
|
168
|
-
|
170
|
+
assert_equal 'abc\\', F.make_path_canonical('abc/./', make_slashes_canonical: true)
|
169
171
|
|
170
|
-
|
172
|
+
assert_equal 'abc\\', F.make_path_canonical('abc\\.\\')
|
171
173
|
|
172
|
-
|
174
|
+
assert_equal 'abc\\', F.make_path_canonical('.\\abc\\.\\')
|
173
175
|
|
174
|
-
|
175
|
-
|
176
|
-
|
176
|
+
assert_equal 'abc\\', F.make_path_canonical('./abc/./', make_slashes_canonical: true)
|
177
|
+
end
|
178
|
+
end
|
177
179
|
|
178
|
-
|
180
|
+
def test_two_dots_directories
|
179
181
|
|
180
|
-
|
182
|
+
assert_equal '../', F.make_path_canonical('../')
|
181
183
|
|
182
|
-
|
184
|
+
assert_equal '../abc', F.make_path_canonical('../abc')
|
183
185
|
|
184
|
-
|
186
|
+
if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then
|
185
187
|
|
186
|
-
|
187
|
-
|
188
|
+
assert_equal '.\\', F.make_path_canonical('abc/..')
|
189
|
+
else
|
188
190
|
|
189
|
-
|
190
|
-
|
191
|
+
assert_equal './', F.make_path_canonical('abc/..')
|
192
|
+
end
|
191
193
|
|
192
|
-
|
194
|
+
assert_equal './', F.make_path_canonical('abc/../')
|
193
195
|
|
194
|
-
|
196
|
+
assert_equal 'def', F.make_path_canonical('abc/../def')
|
195
197
|
|
196
|
-
|
198
|
+
if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then
|
197
199
|
|
198
|
-
|
199
|
-
|
200
|
+
assert_equal '.\\', F.make_path_canonical('abc/../def/..')
|
201
|
+
else
|
200
202
|
|
201
|
-
|
202
|
-
|
203
|
+
assert_equal './', F.make_path_canonical('abc/../def/..')
|
204
|
+
end
|
203
205
|
|
204
|
-
|
206
|
+
assert_equal './', F.make_path_canonical('abc/../def/../')
|
205
207
|
|
206
|
-
|
208
|
+
if ::LibPath::Internal_::Platform::Constants::PLATFORM_IS_WINDOWS then
|
207
209
|
|
208
|
-
|
210
|
+
assert_equal '..\\', F.make_path_canonical('..\\')
|
209
211
|
|
210
|
-
|
212
|
+
assert_equal '..\\abc', F.make_path_canonical('..\\abc')
|
211
213
|
|
212
|
-
|
214
|
+
assert_equal '.\\', F.make_path_canonical('abc\\..')
|
213
215
|
|
214
|
-
|
216
|
+
assert_equal '.\\', F.make_path_canonical('abc\\..\\')
|
215
217
|
|
216
|
-
|
217
|
-
|
218
|
+
assert_equal 'def', F.make_path_canonical('abc\\..\\def')
|
219
|
+
assert_equal 'def', F.make_path_canonical('abc\\\\..\\def')
|
218
220
|
|
219
|
-
|
221
|
+
assert_equal '.\\', F.make_path_canonical('abc\\..\\def\\..')
|
220
222
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
223
|
+
assert_equal '.\\', F.make_path_canonical('abc\\..\\def\\..\\')
|
224
|
+
assert_equal '.\\', F.make_path_canonical('abc\\\\..\\def\\..\\')
|
225
|
+
assert_equal '.\\', F.make_path_canonical('abc\\..\\\\def\\..\\')
|
226
|
+
end
|
227
|
+
end
|
226
228
|
end
|
227
229
|
|
228
230
|
|
231
|
+
# ############################## end of file ############################# #
|
232
|
+
|
data/test/unit/util/ts_all.rb
CHANGED
@@ -7,16 +7,16 @@ this_dir = File.expand_path(File.dirname(__FILE__))
|
|
7
7
|
# all tc_*rb in current directory
|
8
8
|
Dir[File.join(this_dir, 'tc_*rb')].each do |file|
|
9
9
|
|
10
|
-
|
10
|
+
$stderr.puts "requiring file '#{file}'" if $DEBUG
|
11
11
|
|
12
|
-
|
12
|
+
require file
|
13
13
|
end
|
14
14
|
|
15
15
|
# all ts_*rb in immediate sub-directories
|
16
16
|
Dir[File.join(this_dir, '*', 'ts_*rb')].each do |file|
|
17
17
|
|
18
|
-
|
18
|
+
$stderr.puts "requiring file '#{file}'" if $DEBUG
|
19
19
|
|
20
|
-
|
20
|
+
require file
|
21
21
|
end
|
22
22
|
|
@@ -6,60 +6,64 @@ require 'libpath/util/unix'
|
|
6
6
|
|
7
7
|
require 'test/unit'
|
8
8
|
|
9
|
+
|
9
10
|
class Test_LibPath_Util_Unix_combine_paths < Test::Unit::TestCase
|
10
11
|
|
11
|
-
|
12
|
+
F = ::LibPath::Util::Unix
|
12
13
|
|
13
|
-
|
14
|
+
def test_no_arguments
|
14
15
|
|
15
|
-
|
16
|
-
|
16
|
+
assert_equal '', F.combine_paths()
|
17
|
+
end
|
17
18
|
|
18
|
-
|
19
|
+
def test_single_argument
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
assert_equal ' ', F.combine_paths(' ')
|
22
|
+
assert_equal 'a', F.combine_paths('a')
|
23
|
+
assert_equal 'abcdef/ghi/jkl.mno', F.combine_paths('abcdef/ghi/jkl.mno')
|
24
|
+
assert_equal '/', F.combine_paths('/')
|
25
|
+
end
|
25
26
|
|
26
|
-
|
27
|
+
def test_relative_cases
|
27
28
|
|
28
|
-
|
29
|
-
|
29
|
+
assert_equal 'a/b/c/d', F.combine_paths('a', 'b', 'c/d')
|
30
|
+
assert_equal 'a/b/c/d', F.combine_paths('a', 'b/', 'c/d')
|
30
31
|
|
31
|
-
|
32
|
+
assert_equal 'a/b', F.combine_paths('', 'a', '', '', 'b')
|
32
33
|
|
33
|
-
|
34
|
-
|
34
|
+
assert_equal 'a/ /b', F.combine_paths('', 'a', '', ' ', 'b')
|
35
|
+
end
|
35
36
|
|
36
|
-
|
37
|
+
def test_tail_absolute_cases
|
37
38
|
|
38
|
-
|
39
|
+
assert_equal '/', F.combine_paths('a', '/')
|
39
40
|
|
40
|
-
|
41
|
+
assert_equal '/', F.combine_paths('a/b/c/d', '/')
|
41
42
|
|
42
|
-
|
43
|
-
|
43
|
+
assert_equal '/', F.combine_paths('a', 'b', '/')
|
44
|
+
end
|
44
45
|
|
45
|
-
|
46
|
+
def test_dots
|
46
47
|
|
47
|
-
|
48
|
-
|
48
|
+
assert_equal 'a/.', F.combine_paths('a', '.')
|
49
|
+
assert_equal 'a', F.combine_paths('a', '.', elide_single_dots: true)
|
49
50
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
assert_equal 'a/b', F.combine_paths('a', '.', 'b', elide_single_dots: true)
|
52
|
+
assert_equal 'a/b', F.combine_paths('a', './', 'b', elide_single_dots: true)
|
53
|
+
assert_equal '/./b', F.combine_paths('a', '/.', 'b', elide_single_dots: true)
|
54
|
+
end
|
54
55
|
|
55
|
-
|
56
|
+
def test_embedded_absolute_cases
|
56
57
|
|
57
|
-
|
58
|
-
|
58
|
+
assert_equal '/a/b/c/d', F.combine_paths('x/y/z', 'z', '/a', 'b', 'c/d')
|
59
|
+
end
|
59
60
|
|
60
|
-
|
61
|
+
def test_multiple_embedded_absolute_cases
|
61
62
|
|
62
|
-
|
63
|
-
|
63
|
+
assert_equal '/a/b/c/d', F.combine_paths('x/y/z', '/z', '/a', 'b', 'c/d')
|
64
|
+
end
|
64
65
|
end
|
65
66
|
|
67
|
+
|
68
|
+
# ############################## end of file ############################# #
|
69
|
+
|