Skip to content

Commit

Permalink
Python: Add test for string encoding dataset check
Browse files Browse the repository at this point in the history
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
tausbn committed Oct 18, 2024
1 parent c8d420e commit f8d3419
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"\uD800"
"?"
19 changes: 19 additions & 0 deletions python/extractor/cli-integration-test/string-encoding/test.sh
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."

0 comments on commit f8d3419

Please sign in to comment.