summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-01-03 16:28:50 +0100
committerGeorg Brandl <georg@python.org>2011-01-03 16:28:50 +0100
commiteaf5ad75624ccc66cd499c57fc8e17cb98a44e10 (patch)
tree3ad3d81a699bfe96776626281e45d02db51598e0
parentcb5b9e2b1e6aac7cd1b842ebb5813e1a020d8309 (diff)
downloadpygments-eaf5ad75624ccc66cd499c57fc8e17cb98a44e10.tar.gz
Add protobuf example file.
-rw-r--r--tests/examplefiles/addressbook.proto30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/examplefiles/addressbook.proto b/tests/examplefiles/addressbook.proto
new file mode 100644
index 00000000..b14829e9
--- /dev/null
+++ b/tests/examplefiles/addressbook.proto
@@ -0,0 +1,30 @@
+// See README.txt for information and build instructions.
+
+package tutorial;
+
+option java_package = "com.example.tutorial";
+option java_outer_classname = "AddressBookProtos";
+
+message Person {
+ required string name = 1;
+ required int32 id = 2; // Unique ID number for this person.
+ optional string email = 3;
+
+ enum PhoneType {
+ MOBILE = 0;
+ HOME = 1;
+ WORK = 2;
+ }
+
+ message PhoneNumber {
+ required string number = 1;
+ optional PhoneType type = 2 [default = HOME];
+ }
+
+ repeated PhoneNumber phone = 4;
+}
+
+// Our address book file is just one of these.
+message AddressBook {
+ repeated Person person = 1;
+}