Sha256: c0a1245087d3e8bf58b8c456ef0ba659f80d4122aacc4684d014e13a6eca75eb

Contents?: true

Size: 508 Bytes

Versions: 33

Compression:

Stored size: 508 Bytes

Contents

require 'test/unit'
require 'nodejs'

class TestNodejsPathname < Test::Unit::TestCase
  def self.windows_platform?
    `process.platform`.start_with?('win')
  end

  def test_windows_pathname_absolute
    assert_equal(true, Pathname.new('c:/foo').absolute?)
    assert_equal(true, Pathname.new('/foo').absolute?)
    assert_equal(true, Pathname.new('\\foo').absolute?)
    assert_equal(false, Pathname.new('.').absolute?)
    assert_equal(false, Pathname.new('foo').absolute?)
  end if windows_platform?
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
opal-1.8.3.rc1 test/nodejs/test_pathname.rb
opal-1.8.2 test/nodejs/test_pathname.rb
opal-1.8.1 test/nodejs/test_pathname.rb
opal-1.8.0 test/nodejs/test_pathname.rb
opal-1.8.0.beta1 test/nodejs/test_pathname.rb
opal-1.7.4 test/nodejs/test_pathname.rb
opal-1.8.0.alpha1 test/nodejs/test_pathname.rb
opal-1.7.3 test/nodejs/test_pathname.rb
opal-1.7.2 test/nodejs/test_pathname.rb
opal-1.7.1 test/nodejs/test_pathname.rb
opal-1.7.0 test/nodejs/test_pathname.rb
opal-1.7.0.rc1 test/nodejs/test_pathname.rb
opal-1.6.1 test/nodejs/test_pathname.rb
opal-1.6.0 test/nodejs/test_pathname.rb
opal-1.6.0.rc1 test/nodejs/test_pathname.rb
opal-1.6.0.alpha1 test/nodejs/test_pathname.rb
opal-1.5.1 test/nodejs/test_pathname.rb
opal-1.5.0 test/nodejs/test_pathname.rb
opal-1.5.0.rc1 test/nodejs/test_pathname.rb
opal-1.4.1 test/nodejs/test_pathname.rb