# # patch "ChangeLog" # from [2abd9c04f20c78fc540bfd97b882a5bf4d898ef3] # to [4bf45a1d9d2660f1f1ebff719ffaeed38c74accf] # # patch "globish.cc" # from [c14030e9cdbf777c180f3324d26c18b25d29cf6e] # to [14e10834707bb7eef6230c33f7b551a090c5f866] # --- ChangeLog +++ ChangeLog @@ -1,5 +1,10 @@ 2005-07-04 Nathaniel Smith + * globish.cc (checked_globish_to_regex): Make the special case for + the empty pattern, actually work. Unit tests now pass. + +2005-07-04 Nathaniel Smith + * netcmd.cc (test_netcmd_functions): Update for new anonymous/auth packet formats. --- globish.cc +++ globish.cc @@ -13,7 +13,7 @@ // // Pattern tranformation: // -// - As a special case, the empty pattern is translated to "$^", which cannot +// - As a special case, the empty pattern is translated to "$.^", which cannot // match any string. // // - Any character except those described below are copied as they are. @@ -50,7 +50,7 @@ if (glob == "") { - regex = "$^"; + regex = "$.^"; // and the below loop will do nothing } for (std::string::const_iterator i = glob.begin(); i != glob.end(); ++i) @@ -136,7 +136,6 @@ return boost::regex_match(s, r_inc) && !boost::regex_match(s, r_exc); } - #ifdef BUILD_UNIT_TESTS #include "unit_tests.hh"