Skip to content

Commit a09a99a

Browse files
committed
Custom glob tests
Signed-off-by: worksofliam <[email protected]>
1 parent f354199 commit a09a99a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

cli/test/utils.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { describe, expect, it } from "vitest";
2+
import { globalEntryIsValid } from "../src/utils";
3+
4+
describe(`util tests`, () => {
5+
it(`should pass`, () => {
6+
expect(globalEntryIsValid(`/RPGLEREPL/BND/REPL_CMPL.BND`, `QRPGLEREF/REPL_USR.*`)).toBeFalsy();
7+
expect(globalEntryIsValid(`/RPGLEREPL/REF/REPL_USR.RPGLEINC`, `QRPGLEREF/REPL_USR.*`)).toBeFalsy();
8+
expect(globalEntryIsValid(`/RPGLEREPL/BND/REPL_USR.BND`, `REPL_USR.R*`)).toBeFalsy();
9+
expect(globalEntryIsValid(`/RPGLEREPL/QRPGLEREF/REPL_USR.BND`, `REPL_USR.R*`)).toBeFalsy();
10+
11+
expect(globalEntryIsValid(`/RPGLEREPL/QRPGLEREF/REPL_USR.RPGLEINC`, `REPL_USR.R*`)).toBeTruthy();
12+
expect(globalEntryIsValid(`/RPGLEREPL/QRPGLEREF/REPL_USR.RPGLEINC`, `QRPGLEREF/REPL_USR.*`)).toBeTruthy();
13+
expect(globalEntryIsValid(`/RPGLEREPL/BND/REPL_USR.BND`, `REPL_USR.*`)).toBeTruthy();
14+
});
15+
});

0 commit comments

Comments
 (0)