⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (454 Bytes)
Feature #8709
ยป globtest.rb
tommorris (Tom Morris)
, 07/31/2013 01:24 AM
require
"test/unit"
class
TestDirGlob
<
Test
::
Unit
::
TestCase
def
setup
`mkdir /tmp/rubytest/`
[
"001"
,
"002"
,
"003"
,
"999"
].
each
do
|
num
|
`touch /tmp/rubytest/
#{
num
}
.txt`
end
end
def
teardown
`rm -rf /tmp/rubytest`
end
def
test_glob
res
=
Dir
.
glob
(
"/tmp/rubytest/*.txt"
)
assert_equal
(
res
.
sort
,
res
)
end
def
test_dir_accessor
res
=
Dir
[
"/tmp/rubytest/*.txt"
]
assert_equal
(
res
.
sort
,
res
)
end
end
(1-1/1)
Loading...