1# Regression test for #610: 2# Error "'dict_values' object does not support indexing" while compiling .proto files 3 4Import("env") 5 6# First the simple case with two files 7env.NanopbProto("LogMessage.proto") 8env.NanopbProto(["DataPacket.proto", "LogMessage.proto"]) 9env.Object("LogMessage.pb.c") 10env.Object("DataPacket.pb.c") 11 12# Then the complex hierarchy case 13all_files = [ 14'nanopb_generator_bug/first/a/aa.proto', 15'nanopb_generator_bug/first/a/ab.proto', 16'nanopb_generator_bug/first/a.proto', 17'nanopb_generator_bug/first/b/ba.proto', 18'nanopb_generator_bug/first/b.proto', 19'nanopb_generator_bug/first.proto' 20] 21 22env2 = env.Clone() 23env2.Append(CPPPATH = "$BUILD/regression/issue_610") 24 25for f in all_files: 26 env2.NanopbProto([f] + all_files) 27 28for f in all_files: 29 env2.Object(f.replace('.proto', '.pb.c')) 30 31env2.Match(["nanopb_generator_bug/first.pb.h", "first.expected"]) 32