-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python: Add test for string encoding dataset check
Note that this test checks that the current setup creates dataset check violations. A later commit will fix this (and flip the negation in the test).
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
python/extractor/cli-integration-test/string-encoding/repo_dir/test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"\uD800" | ||
"?" |
19 changes: 19 additions & 0 deletions
19
python/extractor/cli-integration-test/string-encoding/test.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ | ||
|
||
set -x | ||
|
||
CODEQL=${CODEQL:-codeql} | ||
|
||
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
cd "$SCRIPTDIR" | ||
|
||
rm -rf db | ||
|
||
$CODEQL database create db --language python --source-root repo_dir/ | ||
|
||
# Note the negation in front -- it witnesses the fact that currently the dataset check FAILS. | ||
! $CODEQL dataset check db/db-python | ||
|
||
echo "Test successfully completed." |