# # # add_dir "tests/automate_put_revision_unknown_file" # # add_file "tests/automate_put_revision_unknown_file/__driver__.lua" # content [d5b1f6c033de58c6e27f13ac6296d055e79eb5f8] # # patch "tests/automate_put_revision/__driver__.lua" # from [5fdca861c4b30d9cde87a775dca9e2d843b843b2] # to [dfe8e3ab661ea525a3d7dd5f1cbf85ac3a3cb987] # ============================================================ --- tests/automate_put_revision_unknown_file/__driver__.lua d5b1f6c033de58c6e27f13ac6296d055e79eb5f8 +++ tests/automate_put_revision_unknown_file/__driver__.lua d5b1f6c033de58c6e27f13ac6296d055e79eb5f8 @@ -0,0 +1,8 @@ +-- +-- subsequent test for automate put_revision +-- this should error out since the file version for foo.txt is unknown +-- +mtn_setup() +edge = "format_version \"1\"\n\nnew_manifest [0000000000000000000000000000000000000000]\n\nold_revision []\n\nadd_dir \"\"\n\nadd_file \"foo.txt\"\ncontent [1234567890123456789012345678901234567890]" +check(mtn("automate", "put_revision", edge), 1, false, false) + ============================================================ --- tests/automate_put_revision/__driver__.lua 5fdca861c4b30d9cde87a775dca9e2d843b843b2 +++ tests/automate_put_revision/__driver__.lua dfe8e3ab661ea525a3d7dd5f1cbf85ac3a3cb987 @@ -22,3 +22,11 @@ check(rev.."\n" == readfile("stdout")) check(mtn("automate", "heads", "testbranch"), 0, true, false) canonicalize("stdout") check(rev.."\n" == readfile("stdout")) + +-- +-- this should exit cleanly without an invariant being violated +-- I'm trying to add a node which already exists +-- +edge = "format_version \"1\"\n\nnew_manifest [0000000000000000000000000000000000000000]\n\nold_revision [4c2c1d846fa561601254200918fba1fd71e6795d]\n\nadd_file \"foo\"\n content [5bf1fd927dfb8679496a2e6cf00cbe50c1c87145]\n" +check(mtn("automate", "put_revision", edge), 1, false, false) +