update npm dependencies, add testcase (#133)

This commit is contained in:
Lars Hvam
2022-09-19 17:28:33 +02:00
committed by GitHub
parent b529ff0a40
commit 7de3ed1a5f
6 changed files with 67 additions and 32 deletions

56
package-lock.json generated
View File

@@ -9,10 +9,10 @@
"version": "0.1.0", "version": "0.1.0",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"@abaplint/cli": "^2.93.20", "@abaplint/cli": "^2.93.21",
"@abaplint/runtime": "^2.1.68", "@abaplint/runtime": "^2.1.70",
"@abaplint/transpiler": "^2.1.68", "@abaplint/transpiler": "^2.1.70",
"@abaplint/transpiler-cli": "^2.1.68" "@abaplint/transpiler-cli": "^2.1.70"
}, },
"bin": { "bin": {
"abap-test-runner": "bin/run.sh" "abap-test-runner": "bin/run.sh"
@@ -28,9 +28,9 @@
} }
}, },
"node_modules/@abaplint/cli": { "node_modules/@abaplint/cli": {
"version": "2.93.20", "version": "2.93.21",
"resolved": "https://registry.npmjs.org/@abaplint/cli/-/cli-2.93.20.tgz", "resolved": "https://registry.npmjs.org/@abaplint/cli/-/cli-2.93.21.tgz",
"integrity": "sha512-s/xtLmLtAtADQSg51oQkqINI2sSlofPjlfHBRqM6VsD4A/iOAdx7d3nZf2yrribEuhy98igurYMkJNVkwybbFA==", "integrity": "sha512-OZSkHK68WhVm6edFaV/V3yAISg6+pRVD9N9+0HGNs4WJvMrdonqJ+eWTnWYyoONT5FDp9bzJFj5Jt48UTKKUag==",
"bin": { "bin": {
"abaplint": "abaplint" "abaplint": "abaplint"
}, },
@@ -52,26 +52,26 @@
} }
}, },
"node_modules/@abaplint/runtime": { "node_modules/@abaplint/runtime": {
"version": "2.1.68", "version": "2.1.70",
"resolved": "https://registry.npmjs.org/@abaplint/runtime/-/runtime-2.1.68.tgz", "resolved": "https://registry.npmjs.org/@abaplint/runtime/-/runtime-2.1.70.tgz",
"integrity": "sha512-hL3UYy2ZxKs+jzOxN+glFgkl8/UC5y+l+IKdQzTU78WEn8+yOgkg25bJW7DVqmKgDWGLhbmaFBCWbDFSDZwAPA==", "integrity": "sha512-9qG0/roJHYjZgjIXFszEASopPtXBiZci2xHpDyje/GYnKnJk9zeabEPnJyIfiXn6wEfY/18WmDkeEuz+eHVq1Q==",
"dependencies": { "dependencies": {
"temporal-polyfill": "^0.0.8" "temporal-polyfill": "^0.0.8"
} }
}, },
"node_modules/@abaplint/transpiler": { "node_modules/@abaplint/transpiler": {
"version": "2.1.68", "version": "2.1.70",
"resolved": "https://registry.npmjs.org/@abaplint/transpiler/-/transpiler-2.1.68.tgz", "resolved": "https://registry.npmjs.org/@abaplint/transpiler/-/transpiler-2.1.70.tgz",
"integrity": "sha512-x41Nkta6mZe2L/wZeqN7uq0YOXY3dX4JtO2Tp+u114V7EU1Nhm38g1PcLAwBrHoyKnB2AUzNRrLSj3kpptn9aA==", "integrity": "sha512-VIG7TgKkpR9sY1v48ElJIGCO58eTEEGJ4VE4NNbXjzuk4zCqIVEjtRrXtbWZcie5eVzUlDMzYp/9LJK9Z3GWSA==",
"dependencies": { "dependencies": {
"@abaplint/core": "^2.93.20", "@abaplint/core": "^2.93.20",
"source-map": "^0.7.4" "source-map": "^0.7.4"
} }
}, },
"node_modules/@abaplint/transpiler-cli": { "node_modules/@abaplint/transpiler-cli": {
"version": "2.1.68", "version": "2.1.70",
"resolved": "https://registry.npmjs.org/@abaplint/transpiler-cli/-/transpiler-cli-2.1.68.tgz", "resolved": "https://registry.npmjs.org/@abaplint/transpiler-cli/-/transpiler-cli-2.1.70.tgz",
"integrity": "sha512-i24pUfsgiiBxu2mzgHX1c5MYISUDZY5VVlfbUF0AkBrXFYTYcx5LbrbOuJwD0PDmmTj9CtVGMArgIAEGvTrOqw==", "integrity": "sha512-nkkaQadR6NvvCVenoGCs9KD7RAtRIAM63QJmiA7ULgcEmbVl8wHFN86KudHxVUmijAaIqCFDguAwSE5cOCYsIA==",
"bin": { "bin": {
"abap_transpile": "abap_transpile" "abap_transpile": "abap_transpile"
} }
@@ -1183,9 +1183,9 @@
}, },
"dependencies": { "dependencies": {
"@abaplint/cli": { "@abaplint/cli": {
"version": "2.93.20", "version": "2.93.21",
"resolved": "https://registry.npmjs.org/@abaplint/cli/-/cli-2.93.20.tgz", "resolved": "https://registry.npmjs.org/@abaplint/cli/-/cli-2.93.21.tgz",
"integrity": "sha512-s/xtLmLtAtADQSg51oQkqINI2sSlofPjlfHBRqM6VsD4A/iOAdx7d3nZf2yrribEuhy98igurYMkJNVkwybbFA==" "integrity": "sha512-OZSkHK68WhVm6edFaV/V3yAISg6+pRVD9N9+0HGNs4WJvMrdonqJ+eWTnWYyoONT5FDp9bzJFj5Jt48UTKKUag=="
}, },
"@abaplint/core": { "@abaplint/core": {
"version": "2.93.20", "version": "2.93.20",
@@ -1198,17 +1198,17 @@
} }
}, },
"@abaplint/runtime": { "@abaplint/runtime": {
"version": "2.1.68", "version": "2.1.70",
"resolved": "https://registry.npmjs.org/@abaplint/runtime/-/runtime-2.1.68.tgz", "resolved": "https://registry.npmjs.org/@abaplint/runtime/-/runtime-2.1.70.tgz",
"integrity": "sha512-hL3UYy2ZxKs+jzOxN+glFgkl8/UC5y+l+IKdQzTU78WEn8+yOgkg25bJW7DVqmKgDWGLhbmaFBCWbDFSDZwAPA==", "integrity": "sha512-9qG0/roJHYjZgjIXFszEASopPtXBiZci2xHpDyje/GYnKnJk9zeabEPnJyIfiXn6wEfY/18WmDkeEuz+eHVq1Q==",
"requires": { "requires": {
"temporal-polyfill": "^0.0.8" "temporal-polyfill": "^0.0.8"
} }
}, },
"@abaplint/transpiler": { "@abaplint/transpiler": {
"version": "2.1.68", "version": "2.1.70",
"resolved": "https://registry.npmjs.org/@abaplint/transpiler/-/transpiler-2.1.68.tgz", "resolved": "https://registry.npmjs.org/@abaplint/transpiler/-/transpiler-2.1.70.tgz",
"integrity": "sha512-x41Nkta6mZe2L/wZeqN7uq0YOXY3dX4JtO2Tp+u114V7EU1Nhm38g1PcLAwBrHoyKnB2AUzNRrLSj3kpptn9aA==", "integrity": "sha512-VIG7TgKkpR9sY1v48ElJIGCO58eTEEGJ4VE4NNbXjzuk4zCqIVEjtRrXtbWZcie5eVzUlDMzYp/9LJK9Z3GWSA==",
"requires": { "requires": {
"@abaplint/core": "^2.93.20", "@abaplint/core": "^2.93.20",
"source-map": "^0.7.4" "source-map": "^0.7.4"
@@ -1222,9 +1222,9 @@
} }
}, },
"@abaplint/transpiler-cli": { "@abaplint/transpiler-cli": {
"version": "2.1.68", "version": "2.1.70",
"resolved": "https://registry.npmjs.org/@abaplint/transpiler-cli/-/transpiler-cli-2.1.68.tgz", "resolved": "https://registry.npmjs.org/@abaplint/transpiler-cli/-/transpiler-cli-2.1.70.tgz",
"integrity": "sha512-i24pUfsgiiBxu2mzgHX1c5MYISUDZY5VVlfbUF0AkBrXFYTYcx5LbrbOuJwD0PDmmTj9CtVGMArgIAEGvTrOqw==" "integrity": "sha512-nkkaQadR6NvvCVenoGCs9KD7RAtRIAM63QJmiA7ULgcEmbVl8wHFN86KudHxVUmijAaIqCFDguAwSE5cOCYsIA=="
}, },
"@types/chai": { "@types/chai": {
"version": "4.3.3", "version": "4.3.3",

View File

@@ -26,10 +26,10 @@
"require": "source-map-support/register" "require": "source-map-support/register"
}, },
"dependencies": { "dependencies": {
"@abaplint/transpiler-cli": "^2.1.68", "@abaplint/transpiler-cli": "^2.1.70",
"@abaplint/transpiler": "^2.1.68", "@abaplint/transpiler": "^2.1.70",
"@abaplint/cli": "^2.93.20", "@abaplint/cli": "^2.93.21",
"@abaplint/runtime": "^2.1.68" "@abaplint/runtime": "^2.1.70"
}, },
"devDependencies": { "devDependencies": {
"@types/chai": "^4.3.3", "@types/chai": "^4.3.3",

View File

@@ -64,4 +64,8 @@ describe('abap-test-runner', async () => {
it('use-ddic-string-table', async () => { it('use-ddic-string-table', async () => {
test("use-ddic-string-table", "pass"); test("use-ddic-string-table", "pass");
}); });
it('unknown-variable', async () => {
test("unknown-variable", "error");
});
}); });

View File

@@ -0,0 +1 @@
{"version":2,"status":"error","tests":[],"message":"./zcl_simple.clas.abap[9, 5] - \"asdf\" not found, Target (check_syntax) [E]\nabaplint: 1 issue(s) found"}

View File

@@ -0,0 +1,12 @@
CLASS zcl_simple DEFINITION PUBLIC.
PUBLIC SECTION.
METHODS run RETURNING VALUE(res) TYPE i.
ENDCLASS.
CLASS zcl_simple IMPLEMENTATION.
METHOD run.
CLEAR asdf.
ENDMETHOD.
ENDCLASS.

View File

@@ -0,0 +1,18 @@
CLASS ltcl_simple DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL.
PRIVATE SECTION.
METHODS test FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS ltcl_simple IMPLEMENTATION.
METHOD test.
DATA simple TYPE REF TO zcl_simple.
CREATE OBJECT simple.
cl_abap_unit_assert=>assert_equals(
act = simple->run( )
exp = 3 ).
ENDMETHOD.
ENDCLASS.