Renamed path_join to join_paths.

pull/914/head
Jussi Pakkanen 8 years ago
parent c3db008d82
commit 1efcea9617
  1. 4
      mesonbuild/interpreter.py
  2. 13
      test cases/common/119 pathjoin/meson.build

@ -1207,7 +1207,7 @@ class Interpreter():
'declare_dependency': self.func_declare_dependency,
'assert': self.func_assert,
'environment' : self.func_environment,
'path_join' : self.func_path_join,
'join_paths' : self.func_join_paths,
}
def parse_project(self):
@ -2250,7 +2250,7 @@ class Interpreter():
@stringArgs
@noKwargs
def func_path_join(self, node, args, kwargs):
def func_join_paths(self, node, args, kwargs):
if isinstance(args, str):
st = (args,)
else:

@ -1,9 +1,8 @@
project('pathjoin', 'c')
assert(path_join('foo') == 'foo', 'Single argument join is broken')
assert(path_join('foo', 'bar') == 'foo/bar', 'Path joining is broken')
assert(path_join('foo', 'bar', 'baz') == 'foo/bar/baz', 'Path joining is broken')
assert(path_join('/foo', 'bar') == '/foo/bar', 'Path joining is broken')
assert(path_join('foo', '/bar') == '/bar', 'Absolute path joining is broken')
assert(path_join('/foo', '/bar') == '/bar', 'Absolute path joining is broken')
assert(join_paths('foo') == 'foo', 'Single argument join is broken')
assert(join_paths('foo', 'bar') == 'foo/bar', 'Path joining is broken')
assert(join_paths('foo', 'bar', 'baz') == 'foo/bar/baz', 'Path joining is broken')
assert(join_paths('/foo', 'bar') == '/foo/bar', 'Path joining is broken')
assert(join_paths('foo', '/bar') == '/bar', 'Absolute path joining is broken')
assert(join_paths('/foo', '/bar') == '/bar', 'Absolute path joining is broken')

Loading…
Cancel
Save