Sha256: 37ec2f9f62974a91dbf10e5c50dc771f4a40818830fd5809c4ecb061295e963f

Contents?: true

Size: 822 Bytes

Versions: 28

Compression:

Stored size: 822 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), "..", "parser_test_helper"))

class EbnfJavascriptTest < Test::Unit::TestCase
  include PDocTestHelper
  
  def setup
    @parser = EbnfJavascriptParser.new
  end
  
  def test_variable
    assert_parsed "innerHTML"
    assert_parsed "extended"
    assert_parsed "getElementsByClassName"
  end
  
  def test_constant
    assert_parsed "Element"
    assert_parsed "DefaultOptions"
  end
  
  def test_all_caps_constant
    assert_parsed "CSS"
    assert_parsed "KEY_BACKSPACE"
  end
  
  def test_object # basic and non-recursive
    assert_parsed "{}"
    assert_parsed "{foo: 'bar'}"
  end
  
  def test_namespace # basic and non-recursive
    assert_parsed "Foo.Bar"
    assert_parsed "foo.bar"
    assert_parsed "foo.Bar"
    assert_parsed "Foo.bar"
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
distil-0.14.4 vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.14.3 vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.14.2 vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.14.2.a vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.14.1 vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.14.1.a vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.14.0 vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.14.0.i vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.14.0.h vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.14.0.g vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.14.0.d vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.14.0.c vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.14.0.b vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.13.6 vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.13.5 vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.13.4 vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.13.3 vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.13.2 vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.13.1 vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb
distil-0.13.0 vendor/pdoc/test/unit/parser/ebnf_javascript_test.rb