1
0
mirror of https://github.com/sasjs/lint.git synced 2026-01-08 13:00:06 +00:00

tests(hasMacroNameInMend): Added more

This commit is contained in:
Saad Jutt
2021-04-21 03:31:14 +05:00
parent 6fd941aa2d
commit 59f7e71919

View File

@@ -348,6 +348,15 @@ describe('hasMacroNameInMend', () => {
expect(formattedContent).toEqual(expectedContent) expect(formattedContent).toEqual(expectedContent)
}) })
it('should add macro name to the mend statement if not present ( code in single line )', () => {
const content = `%macro somemacro; %put &sysmacroname; %mend;`
const expectedContent = `%macro somemacro; %put &sysmacroname; %mend somemacro;`
const formattedContent = hasMacroNameInMend.fix!(content, new LintConfig())
expect(formattedContent).toEqual(expectedContent)
})
it('should add macro name to the mend statement if not present ( with multiple macros )', () => { it('should add macro name to the mend statement if not present ( with multiple macros )', () => {
const content = ` const content = `
%macro somemacro; %macro somemacro;