# # patch "cset.cc" # from [4768e4a9819a0d8228d2c7cdbaa61be7712829ff] # to [a22992977fd4582ecec3f91196e2f846b60ccaa9] # ======================================================================== --- cset.cc 4768e4a9819a0d8228d2c7cdbaa61be7712829ff +++ cset.cc a22992977fd4582ecec3f91196e2f846b60ccaa9 @@ -558,7 +558,7 @@ setup_roster(r, f1, nis); cset cs; MM(cs); cs.attrs_set.insert(std::make_pair(std::make_pair(foo_bar, attr_key("attr_file")), - attr_value("attr_dir"))); + attr_value("value_file"))); BOOST_CHECK_THROW(cs.apply_to(tree), std::logic_error); } { @@ -569,6 +569,16 @@ BOOST_CHECK_THROW(cs.apply_to(tree), std::logic_error); } { + L(F("TEST: can't clear non-existent attr that once existed")); + setup_roster(r, f1, nis); + cset cs; MM(cs); + cs.attrs_cleared.insert(std::make_pair(foo_bar, attr_key("attr_file"))); + // exists now, so should be fine + BOOST_CHECK_NOT_THROW(cs.apply_to(tree), std::logic_error); + // but last time killed it, so can't be killed again + BOOST_CHECK_THROW(cs.apply_to(tree), std::logic_error); + } + { L(F("TEST: can't have no-op deltas")); setup_roster(r, f1, nis); cset cs; MM(cs);