diff --git a/python/extractor/cli-integration-test/string-encoding/repo_dir/test.py b/python/extractor/cli-integration-test/string-encoding/repo_dir/test.py new file mode 100644 index 0000000000000..8e7efcaf92606 --- /dev/null +++ b/python/extractor/cli-integration-test/string-encoding/repo_dir/test.py @@ -0,0 +1,2 @@ +"\uD800" +"?" diff --git a/python/extractor/cli-integration-test/string-encoding/test.sh b/python/extractor/cli-integration-test/string-encoding/test.sh new file mode 100755 index 0000000000000..a8cf5afb824b9 --- /dev/null +++ b/python/extractor/cli-integration-test/string-encoding/test.sh @@ -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."