#!/usr/bin/env bats # Override possible binary in PATH by dev version spezilinter() { cargo run -- "$@" } # Extract the version from Cargo.toml get_version() { grep '^version' Cargo.toml | awk -F ' = ' '{ print $2 }' | tr -d '"' } @test "spezilinter shows correct version" { version=$(get_version) run spezilinter -V [ $status -eq 0 ] [[ "$output" =~ "spezilinter $version" ]] } @test "spezilinter detects GPS data in image" { run spezilinter testdata/exif-gps.jpg [ $status -ne 0 ] [[ "$output" =~ "Error validating testdata/exif-gps.jpg: 60 EXIF tags violated the allowlist" ]] } @test "spezilinter processes non-EXIF image successfully" { run spezilinter testdata/exif-stripped.jpg [ $status -eq 0 ] }