chore(demo): adding extra regex's to mpe_x_test
This commit is contained in:
@@ -83,4 +83,4 @@ Only one regex ever runs per column. If a HARDREGEX rule exists, SOFTREGEX is ig
|
||||
|
||||
- Unit tests: `parseRegexRule.spec.ts`, `isRegexRuleExempt.spec.ts`, `dq-validation.spec.ts`, `dc-validator.spec.ts` (under `client/src/app/shared/dc-validator/`), `client/src/app/editor/utils/regex-warning-renderer.spec.ts`, `client/src/app/shared/utils/col-info-html.spec.ts`.
|
||||
- E2E: `client/cypress/e2e/editor.cy.ts`.
|
||||
- SAS side: `sas/sasjs/services/editors/stagedata.test.3.sas`, plus seed data in `mpe_makedata.sas` (demo HARDREGEX rule "SOME_CHAR must contain 'the' or 'data'" (`/the|data/i`) and SOFTREGEX "should contain the letter 't'").
|
||||
- SAS side: `sas/sasjs/services/editors/stagedata.test.3.sas`, plus seed data in `mpe_makedata.sas`: HARDREGEX "SOME_CHAR must contain 'the' or 'data'" (`/the|data/i`), SOFTREGEX "SOME_CHAR should contain the letter 't'", SOFTREGEX on PRIMARY_KEY_FIELD (`/^\d+$/` - yellow if the key contains a decimal), and HARDREGEX on SOME_SHORTNUM (`/^(??$).*/` - values 1-5 blocked; generated data starts at 6 so demos aren't blocked accidentally).
|
||||
|
||||
@@ -2012,6 +2012,29 @@ insert into &lib..MPE_VALIDATIONS set
|
||||
,rule_value='/t/'
|
||||
,rule_active=1
|
||||
,tx_to='31DEC5999:23:59:59'dt;
|
||||
/* test soft regex - PRIMARY_KEY_FIELD should be an integer (yellow if it
|
||||
contains a decimal point). All generated keys are integers, so no
|
||||
warning shows until a demo user enters a decimal. */
|
||||
insert into &lib..MPE_VALIDATIONS set
|
||||
tx_from=0
|
||||
,base_lib="&lib"
|
||||
,base_ds="MPE_X_TEST"
|
||||
,base_col="PRIMARY_KEY_FIELD"
|
||||
,rule_type='SOFTREGEX'
|
||||
,rule_value='/^\d+$/'
|
||||
,rule_active=1
|
||||
,tx_to='31DEC5999:23:59:59'dt;
|
||||
/* test hard regex - SOME_SHORTNUM must not be between 1 and 5. Generated
|
||||
data starts at 6, so nothing is blocked until a demo user enters 1-5. */
|
||||
insert into &lib..MPE_VALIDATIONS set
|
||||
tx_from=0
|
||||
,base_lib="&lib"
|
||||
,base_ds="MPE_X_TEST"
|
||||
,base_col="SOME_SHORTNUM"
|
||||
,rule_type='HARDREGEX'
|
||||
,rule_value='/^(??$).*/'
|
||||
,rule_active=1
|
||||
,tx_to='31DEC5999:23:59:59'dt;
|
||||
insert into &lib..MPE_VALIDATIONS set
|
||||
tx_from=0
|
||||
,base_lib="&lib"
|
||||
@@ -2061,7 +2084,7 @@ insert into &lib..MPE_VALIDATIONS set
|
||||
,some_date=42
|
||||
,some_datetime=42
|
||||
,some_time=42
|
||||
,some_shortnum=3
|
||||
,some_shortnum=8
|
||||
,some_bestnum=44;
|
||||
insert into &lib..mpe_x_test
|
||||
set primary_key_field=1
|
||||
@@ -2071,7 +2094,7 @@ insert into &lib..MPE_VALIDATIONS set
|
||||
,some_date=42
|
||||
,some_datetime=42
|
||||
,some_time=422
|
||||
,some_shortnum=3
|
||||
,some_shortnum=8
|
||||
,some_bestnum=44;
|
||||
insert into &lib..mpe_x_test
|
||||
set primary_key_field=2
|
||||
@@ -2081,7 +2104,7 @@ insert into &lib..MPE_VALIDATIONS set
|
||||
,some_date=42
|
||||
,some_datetime=42
|
||||
,some_time=142
|
||||
,some_shortnum=3
|
||||
,some_shortnum=8
|
||||
,some_bestnum=44;
|
||||
insert into &lib..mpe_x_test
|
||||
set primary_key_field=3
|
||||
@@ -2093,7 +2116,7 @@ insert into &lib..MPE_VALIDATIONS set
|
||||
,some_date=423
|
||||
,some_datetime=423
|
||||
,some_time=44
|
||||
,some_shortnum=3
|
||||
,some_shortnum=8
|
||||
,some_bestnum=44;
|
||||
insert into &lib..mpe_x_test
|
||||
set primary_key_field=4
|
||||
@@ -2103,7 +2126,7 @@ insert into &lib..MPE_VALIDATIONS set
|
||||
,some_date=4231
|
||||
,some_datetime=423123123
|
||||
,some_time=412
|
||||
,some_shortnum=3
|
||||
,some_shortnum=8
|
||||
,some_bestnum=44;
|
||||
%do x=10 %to 500;
|
||||
insert into &lib..mpe_x_test
|
||||
@@ -2114,7 +2137,7 @@ insert into &lib..MPE_VALIDATIONS set
|
||||
,some_date=round(ranuni(0)*1000,1)
|
||||
,some_datetime=round(ranuni(0)*50000,1)
|
||||
,some_time=round(ranuni(0)*100,1)
|
||||
,some_shortnum=round(ranuni(0)*100,1)
|
||||
,some_shortnum=6+round(ranuni(0)*94,1)
|
||||
,some_bestnum=round(ranuni(0)*100,1);
|
||||
%end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user