Module: File::Etest

Defined in:
lib/vex/base/filesystem/parse_filename.rb

Instance Method Summary collapse

Instance Method Details

#test_basename_wo_extObject



30
31
32
33
34
35
# File 'lib/vex/base/filesystem/parse_filename.rb', line 30

def test_basename_wo_ext
  assert_equal "x", File.basename_wo_ext("x.y")
  assert_equal "x", File.basename_wo_ext("x.")
  assert_equal "", File.basename_wo_ext(".y")
  assert_equal "x", File.basename_wo_ext("x")
end

#test_extname_wo_dotObject



23
24
25
26
27
28
# File 'lib/vex/base/filesystem/parse_filename.rb', line 23

def test_extname_wo_dot
  assert_equal "y", File.extname_wo_dot("x.y")
  assert_equal "", File.extname_wo_dot("x.")
  assert_equal "", File.extname_wo_dot(".y")
  assert_equal "", File.extname_wo_dot("x")
end