@@ -143,9 +143,31 @@ func TestCMakeProjects(t *testing.T) {
143143 }
144144 }
145145 }
146+ // Test updating for just "cpp-flat" using content from "update-cpp-flat" folder.
147+ if project == "cpp-flat" {
148+ t .Logf ("**** Update project cpp-flat (task.fbs and main.cpp) ****" )
149+ cmake .CopyDir (wd , filepath .Join ("update-cpp-flat" , "." ), filepath .Join (confDir ))
150+ if multiConfigBuild {
151+ configs := []string {"Release" , "Debug" }
152+ for _ , config := range configs {
153+ if stdOut , stdErr , err := conf .BuildDefaultsWithConfig (config ); err != nil {
154+ t .Fatalf ("cmake build after update (configuration %s) failed: \n %s\n %s\n %s" , config , stdOut , stdErr , err )
155+ } else {
156+ t .Logf ("build after update (configuration %s) output:\n %s" , config , string (stdOut ))
157+ }
158+ }
159+ } else {
160+ if stdOut , stdErr , err := conf .BuildDefaults (); err != nil {
161+ t .Fatalf ("cmake build after update failed: \n %s\n %s\n %s" , stdOut , stdErr , err )
162+ } else {
163+ t .Logf ("build after update output:\n %s" , string (stdOut ))
164+ }
165+ }
166+ }
146167 }
147168 }
148169 }
170+
149171 }
150172
151173 for _ , singleGenerator := range singleGenerators {
@@ -155,3 +177,6 @@ func TestCMakeProjects(t *testing.T) {
155177 run (multiGenerator , true )
156178 }
157179}
180+
181+ func TestCMakeProjectModify (t * testing.T ) {
182+ }
0 commit comments