You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also the next regex (aimed to search for three dots) in the module is not working for the very same reason; change it from <code>/[^.]+\.{3}/</code> to simply <code>/\.{3}/</code>
1261
+
Also the next regex (aimed to search for three dots) in the module is not working for the very same reason; change it from <code>/[^.]+\\.{3}/</code> to simply <code>/\\.{3}/</code>
1262
1262
1263
1263
The moral? Tests are your friends! We spot, by hazard, an edge case and our code must be able to deal with it, so free as much your fantasy writing your tests. Cockroaches come from box corners.. ops, no I mean: bugs come from edge case.
1264
1264
1265
-
Now we add some test to spot, and die, if three dots are found, with the new simpler regex <code>/\.{3}/</code> so we change the code adding the following code to the test:
1265
+
Now we add some test to spot, and die, if three dots are found, with the new simpler regex <code>/\\.{3}/</code> so we change the code adding the following code to the test:
1266
1266
1267
1267
<pre>
1268
1268
foreach my $newstring ( '1...3', '1,3...5','...', '1...', '...2' ){
0 commit comments