|
7 | 7 | alpha, |
8 | 8 | alphaDashes, |
9 | 9 | alphaLowercase, |
| 10 | + alphaUpperUnderscore, |
10 | 11 | alphanum, |
11 | 12 | alphanumDash, |
12 | 13 | alphanumDashDots, |
@@ -53,6 +54,7 @@ import { |
53 | 54 | const alphanumDashDotsText = 'testwithdashdots-.' |
54 | 55 | const alphanumDashUnderscoreDotsParenthesisText = 'testwithdashdots-_. ()' |
55 | 56 | const alphanumDashText = 'testwithdash-' |
| 57 | +const uppercaseUnderscoreText = 'ASTT_GGF' |
56 | 58 | const asciiLetters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' |
57 | 59 | const nonAsciiLetters = |
58 | 60 | 'ÀÁÂÃÄÅàáâãäåÇçÈÉÊËèéêëÌÍÎÏìíîïÑñÒÓÔÕÖòóôõöÙÚÛÜùúûüÝýÿĀāĈĉĜĝĤĥĴĵŜŝŴŵŶŷāăąǎćĉčċđēĕėęǝğōŏőǒśŝşšūŭůűǔüźżž' |
@@ -378,6 +380,27 @@ describe('@regex', () => { |
378 | 380 | expect(alphanumDots.test(string)).toBe(expected) |
379 | 381 | }) |
380 | 382 | }) |
| 383 | + describe('alphaUpperUnderscore', () => { |
| 384 | + test.each([ |
| 385 | + [alphanumDashText, false], |
| 386 | + [uppercaseUnderscoreText, true], |
| 387 | + [alphanumDashDotsText, false], |
| 388 | + [asciiLetters, false], |
| 389 | + [asciiLowercase, false], |
| 390 | + [asciiUppercase, true], |
| 391 | + [digitsTest, false], |
| 392 | + [emailTest, false], |
| 393 | + [octdigits, false], |
| 394 | + [hexdigits, false], |
| 395 | + [printable, false], |
| 396 | + [punctuation, false], |
| 397 | + [whitespace, false], |
| 398 | + [cronTest, false], |
| 399 | + [macAddress1, false], |
| 400 | + ])('should match regex %s to be %s', (string, expected) => { |
| 401 | + expect(alphaUpperUnderscore.test(string)).toBe(expected) |
| 402 | + }) |
| 403 | + }) |
381 | 404 |
|
382 | 405 | describe('alphanumLowercase', () => { |
383 | 406 | test.each([ |
|
0 commit comments