Skip to content

Commit a10ff82

Browse files
committed
Update deps
1 parent c33eefb commit a10ff82

File tree

7 files changed

+2736
-4799
lines changed

7 files changed

+2736
-4799
lines changed

.snyk

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.md

Lines changed: 52 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,47 @@
11
# SQLlogictest for AlaSQL
22

3-
Testing SQL compabillity for [AlaSQL](https://github.com/agershun/alasql)
4-
5-
6-
How?
7-
----
8-
9-
Go get markdown summery run npm test :
10-
11-
npm test
12-
13-
Result will output to `results/output.md`
14-
15-
16-
17-
18-
What?
19-
-----
20-
21-
The output of `run.js` is the output of each test file followed by the total score. (so you can keep track on overall % of passed tests why its running)
22-
23-
There are about 2 million tests in the full test suite. Many of the tests will trigger the same kind of error - this is why the output will only print the same error the first time it comes forward. To have more examples it will randomly print errors even if it has been printes before. You can also choose to print all errors. Please see the config section in the run.js file.
24-
25-
Please note that the current version of the script **ONLY TESTS IF THE SQL CAN COMPILE** - not if the returned values are correct.
26-
27-
To make sure you are testing the lates stable release please run the following:
28-
29-
npm install alasql
30-
31-
Please see the config section of the `run` files to run tests on local version instead of npm version.
3+
> Testing SQL compabillity for [AlaSQL](https://github.com/agershun/alasql) on the 5,047,257 tests from http://www.sqlite.org/sqllogictest
324
5+
_See the [most recent result](./results/output.md)_
336

347

358
Why?
369
----
3710

38-
AlaSQL src should incooperate test cases from sqllogictest [1] to identify areas where AlaSQL does not comply with expectations to traditional SQL statements.
11+
AlaSQL src should incorporate test cases from sqllogictest [1] to identify areas where AlaSQL does not comply with the expectations to traditional SQL statements.
3912

4013
The goal (for now) is not to pass all the tests, but to help us describe (in the documentation) what AlaSQL does not support - and by that identify areas to improve for the library.
4114

4215
[1] https://github.com/grahn/sqllogictest/tree/master/test
4316

4417
The format of the tests are desribed here: http://www.sqlite.org/sqllogictest/doc/trunk/about.wiki
4518

46-
Supported
47-
---------
4819

49-
- Verify that the parser parses all the tests
50-
51-
- Floating point values are rendered as if by printf("%.3f").
20+
How?
21+
----
5222

53-
- NULL values are rendered as "NULL". Empty strings are rendered as "(empty)". Within non-empty strings, all control characters and unprintable characters are rendered as "@".
23+
Install dependencies `npm install and run all the tests with:
5424

55-
- Implement verification of returned valued with sortorder set
25+
npm test
5626

27+
The result will output to `results/output.md`
5728

29+
To make sure you are testing the most recent version of AlaSQL please run the following:
5830

59-
ToDo
60-
----
31+
npm install alasql
6132

33+
Please see the config section of the `run` files to run tests on local version instead of npm version.
6234

6335

64-
- Change the compabillity flags in alasql accordng to whats mimicked
6536

66-
- implement:
67-
> The <label> argument is also optional. If included, sqllogictest stores a hash of the results of this query under the given label. If the label is reused, then sqllogictest verifies that the results are the same. This can be used to verify that two or more queries in the same test script that are logically equivalent always generate the same output.
37+
What?
38+
-----
6839

40+
The output of `run.js` is the output of each test file followed by the total score. (so you can keep track of the overall % of passed tests while its running)
6941

42+
There are 5,047,257 tests in the full test suite. Many of the tests will trigger the same kind of error - this is why the output will only print the same error the first time it comes forward. To have more examples, there is a (low) probability it print errors again even if it has been printed before. You can also choose to print all errors. Please see the config section in the run.js file.
7043

71-
**Not ToDo**
72-
- Impelment mocha testframework (testresults does not get printed before all are done - so fills the memory)
44+
Please note that the current version of the script **ONLY TESTS IF THE SQL CAN COMPILE** - not if the returned values are correct.
7345

7446

7547
Output
@@ -82,11 +54,11 @@ The output from run.js is structured the following way:
8254
- [notice if this does not represent all test files in the test folder]
8355
- Listing path to each testfile to be used
8456
- For each test file
85-
- Name of the test file that is about to run
86-
- If errors occure the original SQL triggering the error is printed followed by the javascript error description.
87-
- Summery of error rate in this test file and time consumption
88-
- Summery of error rate for all test file
89-
- Note stating: "ALL TESTS COPMLETED"
57+
- Name of the test file that is about to run
58+
- If errors occure the original SQL triggering the error is printed followed by the javascript error description.
59+
- Summary of error rate in this test file and time consumption
60+
- Summary of error rate for all test file
61+
- Note stating: "ALL TESTS COMPLETED"
9062

9163
The output from a single testfile could look like this
9264

@@ -100,7 +72,7 @@ The output from a single testfile could look like this
10072
>
10173
> `sqlite 11924 OK: ./test/index/delete/1000/slt_good_0.test`
10274
103-
It makes sense, as no errors was found. But it can also look like this:
75+
It makes sense, as no errors were found. But it can also look like this:
10476

10577
> ### 6/32 [`./test/index/commute/100/slt_good_0.test`](https://github.com/mathiasrw/alasql-logictest/blob/master/sqllogic/./test/index/commute/100/slt_good_0.test)
10678
>
@@ -112,4 +84,33 @@ It makes sense, as no errors was found. But it can also look like this:
11284
> * 99% was OK
11385
>
11486
115-
making less sense as an error was found but was not printed. Because there are about 2 million tests in the full testset the same errors will be found many times. To limit noise an error only gets printed first time its seen. Settings for printing errors can be found in the config section of run.js
87+
making less sense as an error was found but was not printed. Because there are about 5 million tests in the full testset the same errors will be found many times. To limit noise an error only gets printed first time its seen. Settings for printing errors can be found in the config section of run.js
88+
89+
90+
Supported
91+
---------
92+
93+
- Verify that the parser parses all the tests
94+
95+
- Floating point values are rendered as if by printf("%.3f").
96+
97+
- NULL values are rendered as "NULL". Empty strings are rendered as "(empty)". Within non-empty strings, all control characters and unprintable characters are rendered as "@".
98+
99+
- Implement verification of returned valued with sortorder set
100+
101+
102+
103+
ToDo
104+
----
105+
106+
107+
108+
- Change the compatibility flags in AlaSQL according to whats mimicked
109+
110+
- implement:
111+
> The <label> argument is also optional. If included, sqllogictest stores a hash of the results of this query under the given label. If the label is reused, then sqllogictest verifies that the results are the same. This can be used to verify that two or more queries in the same test script that are logically equivalent always generate the same output.
112+
113+
114+
115+
## Not ToDo
116+
- Implement mocha testframework (testresults does not get printed before all are done - so it fills the memory)

package.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
"description": "sqllogictest of AlaSQL",
55
"main": "sqllogic/run_raw.js",
66
"scripts": {
7-
"test": "node --expose-gc run.js > results/output.md",
8-
"snyk-protect": "snyk protect",
9-
"prepublish": "npm run snyk-protect"
7+
"test": "node --expose-gc run.js > results/output.md"
108
},
119
"repository": {
1210
"type": "git",
@@ -24,15 +22,15 @@
2422
},
2523
"homepage": "https://github.com/mathiasrw/alasql-logictest",
2624
"dependencies": {
27-
"alasql": "^2.0.0",
28-
"comparray": "^1.1.2",
29-
"md5": "^2.2.1",
30-
"numeral": "^1.5.3",
31-
"paralleljs": "^0.2.1",
32-
"pegjs": "^0.10.0",
33-
"sql.js": "^0.5.0",
34-
"yargs": "^16.0.0",
35-
"snyk": "^1.316.1"
36-
},
37-
"snyk": true
25+
"alasql": "2.1.1",
26+
"comparray": "1.1.2",
27+
"md5": "2.3.0",
28+
"numeral": "2.0.6",
29+
"paralleljs": "1.1.0",
30+
"peggy": "^2.0.1",
31+
"pegjs": "0.10.0",
32+
"sql.js": "1.8.0",
33+
"ts-pegjs": "^2.1.0",
34+
"yargs": "17.6.0"
35+
}
3836
}

0 commit comments

Comments
 (0)