snoopdave commented on code in PR #222:
URL: https://github.com/apache/roller/pull/222#discussion_r4406617552


##########
app/src/test/java/org/apache/roller/weblogger/business/UserTest.java:
##########
@@ -149,6 +149,18 @@ public void testUserLookups() throws Exception {
         user = users2.get(0);
         assertNotNull(user);
         assertEquals(testUser.getUserName(), user.getUserName());
+
+        // '%' and '_' in the search text match only themselves
+        assertEquals(0, mgr.getUsersStartingWith("%", Boolean.TRUE, 0, 
10).size());
+        assertEquals(0, mgr.getUsersStartingWith("us_r", Boolean.TRUE, 0, 
10).size());

Review Comment:
   🤖Claude: fixed by building the probe from the test user name: its first 
letter, then `_`, then the next three letters (`j_nit` for 
`junit_userTestUser`). An unescaped `_` matches that name. The three checks now 
use it, on both lookups. With only the `_` escape removed from `likePrefix`, 
`UserTest` fails at that check; with the escape, it passes. (Local change, in 
the next push.)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to