projects
/
p5sagit/p5-mst-13.2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
93578b3
)
add test case for change#3298
Gurusamy Sarathy [Sun, 2 May 1999 19:39:55 +0000 (19:39 +0000)]
p4raw-link: @3298 on //depot/perl:
93578b34124e8a3b976cd7f68c60e871e698c9d5
p4raw-id: //depot/perl@3299
sv.c
patch
|
blob
|
blame
|
history
t/op/readdir.t
patch
|
blob
|
blame
|
history
diff --git
a/sv.c
b/sv.c
index
6068583
..
5772954
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-2737,9
+2737,9
@@
sv_clear(register SV *sv)
{
io_close((IO*)sv);
}
- if (IoDIRP((IO*)sv)) {
- PerlDir_close(IoDIRP((IO*)sv));
- IoDIRP((IO*)sv) = 0;
+ if (IoDIRP(sv)) {
+ PerlDir_close(IoDIRP(sv));
+ IoDIRP(sv) = 0;
}
Safefree(IoTOP_NAME(sv));
Safefree(IoFMT_NAME(sv));
diff --git
a/t/op/readdir.t
b/t/op/readdir.t
index
ca19ebc
..
aea9768
100755
(executable)
--- a/
t/op/readdir.t
+++ b/
t/op/readdir.t
@@
-5,6
+5,12
@@
if ($@) { print "1..0\n"; exit; }
print "1..3\n";
+for $i (1..2000) {
+ local *OP;
+ opendir(OP, "op") or die "can't opendir: $!";
+ # should auto-closedir() here
+}
+
if (opendir(OP, "op")) { print "ok 1\n"; } else { print "not ok 1\n"; }
@D = grep(/^[^\.].*\.t$/i, readdir(OP));
closedir(OP);