docs: 📝 Add clarification on subscript digits range #20
Workflow file for this run
This file contains hidden or 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
| name: Test Unicode Security Scanner | |
| on: | |
| push: | |
| paths: | |
| - 'check-for-unicode/**' | |
| pull_request: | |
| paths: | |
| - 'check-for-unicode/**' | |
| workflow_dispatch: | |
| jobs: | |
| test-scanner: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Make scripts executable | |
| run: | | |
| chmod +x check-for-unicode/run.sh | |
| chmod +x check-for-unicode/test-suite/run-tests.sh | |
| - name: Display scanner version | |
| working-directory: check-for-unicode | |
| run: ./run.sh --version | |
| - name: Run test suite | |
| working-directory: check-for-unicode/test-suite | |
| run: bash run-tests.sh | |
| - name: Test scanner help | |
| working-directory: check-for-unicode | |
| run: | | |
| output=$(./run.sh --help) | |
| if echo "$output" | grep -q "ALLOWLIST FORMAT"; then | |
| echo "✓ Help includes allowlist documentation" | |
| else | |
| echo "✗ Help missing allowlist documentation" | |
| exit 1 | |
| fi | |
| if echo "$output" | grep -q "exclude-emojis"; then | |
| echo "✓ Help includes emoji exclusion flag" | |
| else | |
| echo "✗ Help missing emoji exclusion flag" | |
| exit 1 | |
| fi | |
| - name: Test scanning a clean file | |
| working-directory: check-for-unicode | |
| run: | | |
| if ./run.sh test-suite/clean-test.js; then | |
| echo "✓ Clean file test passed" | |
| else | |
| echo "✗ Clean file test failed" | |
| exit 1 | |
| fi | |
| - name: Test detection of malicious file | |
| working-directory: check-for-unicode | |
| run: | | |
| if ./run.sh test-suite/trojan-source-test.js; then | |
| echo "✗ Malicious file was not detected" | |
| exit 1 | |
| else | |
| echo "✓ Malicious file correctly detected" | |
| fi | |
| - name: Test JSON output | |
| working-directory: check-for-unicode | |
| run: | | |
| output=$(./run.sh --json test-suite/clean-test.js) | |
| echo "$output" | jq . | |
| if echo "$output" | jq -e '.scanner' > /dev/null; then | |
| echo "✓ JSON output test passed" | |
| else | |
| echo "✗ JSON output test failed" | |
| exit 1 | |
| fi | |
| - name: Test quiet mode | |
| working-directory: check-for-unicode | |
| run: | | |
| output=$(./run.sh --quiet test-suite/clean-test.js 2>&1) | |
| if [ -z "$output" ]; then | |
| echo "✓ Quiet mode test passed (no output)" | |
| else | |
| echo "✗ Quiet mode test failed (unexpected output: $output)" | |
| exit 1 | |
| fi |