From 6d92233e726bb8ab8154229b7c9df74473eb06a1 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Mon, 25 Jul 2016 00:29:47 -0700 Subject: Added unit test for PascalCasing package names in Ruby. --- ruby/tests/generated_code.proto | 2 +- ruby/tests/generated_code_test.rb | 2 ++ ruby/tests/test_import.proto | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 ruby/tests/test_import.proto (limited to 'ruby/tests') diff --git a/ruby/tests/generated_code.proto b/ruby/tests/generated_code.proto index 42d82a6b..62fd83ed 100644 --- a/ruby/tests/generated_code.proto +++ b/ruby/tests/generated_code.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package A.B.C; +package a.b.c; message TestMessage { int32 optional_int32 = 1; diff --git a/ruby/tests/generated_code_test.rb b/ruby/tests/generated_code_test.rb index 26bafdd6..b92b0462 100644 --- a/ruby/tests/generated_code_test.rb +++ b/ruby/tests/generated_code_test.rb @@ -4,6 +4,7 @@ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) require 'generated_code_pb' +require 'test_import_pb' require 'test/unit' class GeneratedCodeTest < Test::Unit::TestCase @@ -13,5 +14,6 @@ class GeneratedCodeTest < Test::Unit::TestCase # successfully creates message definitions and classes, not to test every # aspect of the extension (basic.rb is for that). m = A::B::C::TestMessage.new() + m2 = FooBar::TestImportedMessage.new() end end diff --git a/ruby/tests/test_import.proto b/ruby/tests/test_import.proto new file mode 100644 index 00000000..230484ee --- /dev/null +++ b/ruby/tests/test_import.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; + +package foo_bar; + +message TestImportedMessage {} -- cgit v1.2.3