Skip to content

Commit d01593e

Browse files
committed
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).
1 parent c8d420e commit d01593e

File tree

2 files changed

+21
-0
lines changed
  • python/extractor/cli-integration-test/string-encoding

2 files changed

+21
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"\uD800"
2+
"?"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
4+
5+
set -x
6+
7+
CODEQL=${CODEQL:-codeql}
8+
9+
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
10+
cd "$SCRIPTDIR"
11+
12+
rm -rf db
13+
14+
$CODEQL database create db --language python --source-root repo_dir/
15+
16+
# Note the negation in front -- it witnesses the fact that currently the dataset check FAILS.
17+
! $CODEQL dataset check db/db-python
18+
19+
echo "Test successfully completed."

0 commit comments

Comments
 (0)