cFile:ChangeFileExt now accepts extensions with leading dot, too.
This commit is contained in:
@@ -84,10 +84,19 @@ end;
|
||||
|
||||
function TestFileExt()
|
||||
assert(cFile:ChangeFileExt("fileless_dir/", "new") == "fileless_dir/")
|
||||
assert(cFile:ChangeFileExt("fileless_dir/", ".new") == "fileless_dir/")
|
||||
assert(cFile:ChangeFileExt("pathless_file.ext", "new") == "pathless_file.new")
|
||||
assert(cFile:ChangeFileExt("pathless_file.ext", ".new") == "pathless_file.new")
|
||||
assert(cFile:ChangeFileExt("path/to/file.ext", "new") == "path/to/file.new")
|
||||
assert(cFile:ChangeFileExt("path/to/file.ext", ".new") == "path/to/file.new")
|
||||
assert(cFile:ChangeFileExt("path/to.dir/file", "new") == "path/to.dir/file.new")
|
||||
assert(cFile:ChangeFileExt("path/to.dir/file", ".new") == "path/to.dir/file.new")
|
||||
assert(cFile:ChangeFileExt("path/to.dir/file.ext", "new") == "path/to.dir/file.new")
|
||||
assert(cFile:ChangeFileExt("path/to.dir/file.ext", ".new") == "path/to.dir/file.new")
|
||||
assert(cFile:ChangeFileExt("path/to.dir/file.longext", "new") == "path/to.dir/file.new")
|
||||
assert(cFile:ChangeFileExt("path/to.dir/file.longext", ".new") == "path/to.dir/file.new")
|
||||
assert(cFile:ChangeFileExt("path/to.dir/file.", "new") == "path/to.dir/file.new")
|
||||
assert(cFile:ChangeFileExt("path/to.dir/file.", ".new") == "path/to.dir/file.new")
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user