Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

2 views
Skip to first unread message

Paul Cochrane

unread,
Nov 8, 2006, 12:22:37 PM11/8/06
to 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

unread,
Nov 27, 2006, 1:19:20 PM11/27/06
to 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 new messages