All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 Execute(ale#path#Upwards should return the correct path components):
3 " Absolute paths should include / on the end.
5 \ ['/foo/bar/baz', '/foo/bar', '/foo', '/'],
6 \ ale#path#Upwards('/foo/bar/baz')
8 \ ['/foo/bar/baz', '/foo/bar', '/foo', '/'],
9 \ ale#path#Upwards('/foo/bar/baz///')
10 " Relative paths do not.
12 \ ['foo/bar/baz', 'foo/bar', 'foo'],
13 \ ale#path#Upwards('foo/bar/baz')
15 \ ['foo2/bar', 'foo2'],
16 \ ale#path#Upwards('foo//..////foo2////bar')
17 " Expect an empty List for empty strings.
18 AssertEqual [], ale#path#Upwards('')
23 \ ['C:\foo\bar\baz', 'C:\foo\bar', 'C:\foo', 'C:\'],
24 \ ale#path#Upwards('C:\foo\bar\baz')
26 \ ['C:\foo\bar\baz', 'C:\foo\bar', 'C:\foo', 'C:\'],
27 \ ale#path#Upwards('C:\foo\bar\baz\\\')
29 \ ['/foo\bar\baz', '/foo\bar', '/foo', '/'],
30 \ ale#path#Upwards('/foo/bar/baz')
32 \ ['foo\bar\baz', 'foo\bar', 'foo'],
33 \ ale#path#Upwards('foo/bar/baz')
35 \ ['foo\bar\baz', 'foo\bar', 'foo'],
36 \ ale#path#Upwards('foo\bar\baz')
37 " simplify() is used internally, and should sort out \ paths when actually
38 " running Windows, which we can't test here.
40 \ ['foo2\bar', 'foo2'],
41 \ ale#path#Upwards('foo//..///foo2////bar')
42 " Expect an empty List for empty strings.
43 AssertEqual [], ale#path#Upwards('')
44 " Paths starting with // return /
46 \ ['/foo2\bar', '/foo2', '/'],
47 \ ale#path#Upwards('//foo//..///foo2////bar')