mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
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).
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
"\uD800"
|
||||
"?"
|
||||
19
python/extractor/cli-integration-test/string-encoding/test.sh
Executable file
19
python/extractor/cli-integration-test/string-encoding/test.sh
Executable file
@@ -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."
|
||||
Reference in New Issue
Block a user