Implement the stub routine 'ext' in languages/tcl/runtime/builtin/file.pir
This ticket is in response to cage task #39704.
This patch implements the first version of file ext for tcl. I am not
sure if it's supposed to be [file ext] or [file extension], i kept the
stub sub name 'ext' and so pushed 'ext' to the options
ResizablePMCArray. Feel free to change this.
It wasn't possible to test this using the test files, so i "hand made"
some tests using make tclsh:
% file ext
wrong # args: should be "file ext name"
% file ext abc.ddd
.ddd
% file ext foo
% file ext foo.bar
.bar
% file ext .bar
.bar
% file ext aaa.bbb.ccc.bar
.bar
% file ext .
.
% file ext aaa/bbb/ccc.foo
.foo
% file ext aaa\bbb\ccc.foo
.foo
% file ext aaa\aa.bb/ccc.dd
.dd
% file ext abc abc
wrong # args: should be "file ext name"
% file ext foo......bar
.bar
We can check for more stuff when we're able to use the test suit.
Files affected:
languages/tcl/runtime/builtin/file.pir
Best regards,
./smash