コード例 #1
0
 public void testUnsetBranchSection()
 {
     global::GitSharp.Core.Config c = parse(""
                                            + "[branch \"keep\"]\n"
                                            + "  merge = master.branch.to.keep.in.the.file\n"
                                            + "\n"
                                            + "[branch \"remove\"]\n"
                                            + "  merge = this.will.get.deleted\n"
                                            + "  remote = origin-for-some-long-gone-place\n"
                                            + "\n"
                                            + "[core-section-not-to-remove-in-test]\n"
                                            + "  packedGitLimit = 14\n");
     c.unsetSection("branch", "does.not.exist");
     c.unsetSection("branch", "remove");
     Assert.AreEqual("" //
                     + "[branch \"keep\"]\n"
                     + "  merge = master.branch.to.keep.in.the.file\n"
                     + "\n"
                     + "[core-section-not-to-remove-in-test]\n"
                     + "  packedGitLimit = 14\n", c.toText());
 }