Skip to content

Commit 6ba25cc

Browse files
committed
Add the headless API search test for pfgrep
1 parent aa55638 commit 6ba25cc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/api/tests/suites/search.test.ts

+15
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,19 @@ describe('Search Tests', {concurrent: true}, () => {
5454
expect(checkNames(result.hits.map(hit => hit.path.split("/").at(-1)!))).toBe(true);
5555
expect(result.hits.every(hit => !hit.path.endsWith(`MBR`))).toBe(true);
5656
});
57+
58+
it('Filtered members list search', async () => {
59+
const pfgrep = connection.remoteFeatures.pfgrep;
60+
// This test only needs to run if pfgrep is installed
61+
if (pfgrep) {
62+
const resultPfgrep = await Search.searchMembers(connection, "QSYSINC", "QRPGLESRC", "IBM", "CMRPG");
63+
connection.remoteFeatures.pfgrep = undefined;
64+
const resultQsh = await Search.searchMembers(connection, "QSYSINC", "QRPGLESRC", "IBM", "CMRPG");
65+
connection.remoteFeatures.pfgrep = pfgrep;
66+
// XXX: Do a deep equals here (without having to reimplement one)
67+
expect(resultPfgrep.hits[0].lines[0] == resultQsh.hits[0].lines[0]);
68+
} else {
69+
expect(true)
70+
}
71+
});
5772
});

0 commit comments

Comments
 (0)