#zig build-exe {
--name test
-Mroot=test.zig
#}

#write test.zig @0/test.zig
#update
#check stdout {
123
#}

#write test.zig @1/test.zig
#update "add conflict"
#check errors {
test.zig:6:5: error: exported symbol collision: foo
test.zig:1:1: note: other symbol here
#}

#write test.zig @2/test.zig
#update "resolve conflict"
#check stdout {
123 456
#}

#write test.zig @3/test.zig
#update "put exports in decl"
#check stdout {
123 456
#}

#write test.zig @4/test.zig
#update "remove reference to exporting decl"
#check stdout

#write test.zig @5/test.zig
#update "mark consts as export"
#check stdout {
123 456
#}

#write test.zig @6/test.zig
#update "reintroduce reference to exporting decl, introducing conflict"
#check errors {
test.zig:5:5: error: exported symbol collision: bar
test.zig:2:1: note: other symbol here
test.zig:6:5: error: exported symbol collision: other
test.zig:3:1: note: other symbol here
#}
