@@ -401,6 +401,62 @@ public void Can_Generate_Range_Repeated_Set4()
401
401
StringAssert . Matches ( text , new Regex ( @"^[W-X]$" ) ) ;
402
402
}
403
403
404
+ [ TestMethod ]
405
+ [ TestCategory ( "Sets" ) ]
406
+ public void Can_Generate_Section_Repeated_Escape_Chars ( )
407
+ {
408
+ // empty repeat expressions should result in a single instance - {} == {1}
409
+ var template = @"(\\){10}" ;
410
+ string text = AlphaNumericGenerator . GenerateFromPattern ( template ) ;
411
+ Console . WriteLine ( @"'{0}' produced '{1}'" , template , text ) ;
412
+ StringAssert . Matches ( text , new Regex ( template ) ) ;
413
+ }
414
+
415
+ [ TestMethod ]
416
+ [ TestCategory ( "Sets" ) ]
417
+ public void Can_Generate_Repeated_Escape_Chars ( )
418
+ {
419
+ // empty repeat expressions should result in a single instance - {} == {1}
420
+ var template = @"\\{10}" ;
421
+ string text = AlphaNumericGenerator . GenerateFromPattern ( template ) ;
422
+ Console . WriteLine ( @"'{0}' produced '{1}'" , template , text ) ;
423
+ StringAssert . Matches ( text , new Regex ( template ) ) ;
424
+ }
425
+
426
+ [ TestMethod ]
427
+ [ TestCategory ( "Sets" ) ]
428
+ public void Can_Generate_Range_Repeated_Chars ( )
429
+ {
430
+ // empty repeat expressions should result in a single instance - {} == {1}
431
+ var template = @"(a){10}" ;
432
+ string text = AlphaNumericGenerator . GenerateFromPattern ( template ) ;
433
+ Console . WriteLine ( @"'{0}' produced '{1}'" , template , text ) ;
434
+ StringAssert . Matches ( @"aaaaaaaaaa" , new Regex ( template ) ) ;
435
+ }
436
+
437
+
438
+ [ TestMethod ]
439
+ [ TestCategory ( "Sets" ) ]
440
+ public void Can_Generate_Negated_Range ( )
441
+ {
442
+ // empty repeat expressions should result in a single instance - {} == {1}
443
+ var template = @"[^5-9]" ;
444
+ string text = AlphaNumericGenerator . GenerateFromPattern ( template ) ;
445
+ Console . WriteLine ( @"'{0}' produced '{1}'" , template , text ) ;
446
+ StringAssert . Matches ( text , new Regex ( template ) ) ;
447
+ }
448
+
449
+ [ TestMethod ]
450
+ [ TestCategory ( "Sets" ) ]
451
+ public void Can_Generate_Negated_Range_And_Characters ( )
452
+ {
453
+ // empty repeat expressions should result in a single instance - {} == {1}
454
+ var template = @"[^A-Z5-9!£$%^&*()_+]" ;
455
+ string text = AlphaNumericGenerator . GenerateFromPattern ( template ) ;
456
+ Console . WriteLine ( @"'{0}' produced '{1}'" , template , text ) ;
457
+ StringAssert . Matches ( text , new Regex ( template ) ) ;
458
+ }
459
+
404
460
405
461
[ TestMethod ]
406
462
[ TestCategory ( "Sets" ) ]
@@ -1547,6 +1603,7 @@ public void Can_Configure_And_Produce_Output_With_Seed2()
1547
1603
Console . WriteLine ( @"'{0}' produced '{1}'" , template , text ) ;
1548
1604
1549
1605
Assert . AreEqual ( text , @"Generated |k*XjUo6Eo" ) ;
1606
+ //Assert.AreEqual(text, @"Generated |k)XjUo6Eo");
1550
1607
}
1551
1608
1552
1609
[ TestMethod ]
0 commit comments