Skip to content

Commit

Permalink
Fix for broken unreference test
Browse files Browse the repository at this point in the history
Signed-off-by: worksofliam <[email protected]>
  • Loading branch information
worksofliam committed Dec 5, 2024
1 parent e8b6385 commit 207ef62
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion language/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const commonMatchers: Matcher[] = [
{ type: `asterisk` },
{
type: `word`, match: (word) =>
[`CTDATA`, `BLANK`, `BLANKS`, `ZERO`, `ZEROS`, `ON`, `OFF`, `NULL`, `ISO`, `MDY`, `DMY`, `EUR`, `YMD`, `USA`, `SECONDS`, `S`, `MINUTES`, `MN`, `HOURS`, `H`, `DAYS`, `D`, `MONTHS`, `M`, `YEARS`, `Y`, `HIVAL`, `END`, `LOVAL`, `START`, `N`, `OMIT`, `STRING`, `CWIDEN`, `CONVERT`].includes(word.toUpperCase()) || word.toUpperCase().startsWith(`IN`)
[`PSSR`, `CTDATA`, `BLANK`, `BLANKS`, `ZERO`, `ZEROS`, `ON`, `OFF`, `NULL`, `ISO`, `MDY`, `DMY`, `EUR`, `YMD`, `USA`, `SECONDS`, `S`, `MINUTES`, `MN`, `HOURS`, `H`, `DAYS`, `D`, `MONTHS`, `M`, `YEARS`, `Y`, `HIVAL`, `END`, `LOVAL`, `START`, `N`, `OMIT`, `STRING`, `CWIDEN`, `CONVERT`].includes(word.toUpperCase()) || word.toUpperCase().startsWith(`IN`)
}
],
becomes: {
Expand Down
1 change: 0 additions & 1 deletion tests/suite/basics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,6 @@ test(`exec_14`, async () => {

const cache = await parser.getDocs(uri, lines, {withIncludes: true, ignoreCache: true});

console.log(cache.sqlReferences);
expect(cache.sqlReferences.length).toBe(1);
expect(cache.sqlReferences[0].name).toBe(`table1`);
});
Expand Down
3 changes: 0 additions & 3 deletions tests/suite/directives.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,6 @@ test('macro defined test 1', async () => {

const cache = await parser.getDocs(uri, lines, { withIncludes: true, ignoreCache: true });

console.log(cache.procedures);
expect(cache.includes.length).toBe(1);
expect(cache.procedures.length).toBe(1);
})
Expand All @@ -622,7 +621,6 @@ test('macro defined test 2', async () => {

const cache = await parser.getDocs(uri, lines, { withIncludes: true, ignoreCache: true });

console.log(cache.procedures);
expect(cache.includes.length).toBe(1);
expect(cache.procedures.length).toBe(0);
});
Expand All @@ -641,7 +639,6 @@ test('depth test', async () => {

const cache = await parser.getDocs(uri, lines, { withIncludes: true, ignoreCache: true });

console.log(cache.procedures);
expect(cache.includes.length).toBe(2);
expect(cache.variables.length).toBe(3);
})
3 changes: 1 addition & 2 deletions tests/suite/linter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import path from "path";
import setupParser from "../parserSetup";
import Linter from "../../language/linter";
import { test, expect } from "vitest";
import { tokenise } from "../../language/tokens";

const parser = setupParser();
const uri = `source.rpgle`;
Expand Down Expand Up @@ -2792,8 +2793,6 @@ test("issue_175", async () => {
NoUnreferenced: true
}, cache);

console.log(errors);
console.log(lines.substring(errors[0].offset.position, errors[0].offset.end));
expect(errors.length).toBe(0);
});

Expand Down

0 comments on commit 207ef62

Please sign in to comment.