Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

[perl #40729] [TODO] Tcl - implement 'ext' sub in runtime/builtin/file.pir

瀏覽次數:2 次
跳到第一則未讀訊息

Paul Cochrane

未讀,
2006年11月8日 中午12:22:372006/11/8
收件者:bugs-bi...@rt.perl.org
# New Ticket Created by Paul Cochrane
# Please include the string: [perl #40729]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40729 >


Implement the stub routine 'ext' in languages/tcl/runtime/builtin/file.pir

This ticket is in response to cage task #39704.

Nuno Carvalho via RT

未讀,
2006年11月27日 下午1:19:202006/11/27
收件者:perl6-i...@perl.org
Hi all,

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

tcl.file.ext.patch
0 則新訊息