ruby: handle singleton method including ?!= in its name(sf.bug:364)
[geany-mirror.git] / tests / ctags / runner.sh
blobb5dc8e9163ef33e898790bcdebe411ea4d2cb805
1 #!/bin/bash
3 # error out on undefined variable expansion, useful for debugging
4 set -u
6 # FIXME: get this from automake so we have $(EXEEXT)
7 GEANY="${top_builddir:-../..}/src/geany"
8 TMPDIR=$(mktemp -d) || exit 99
9 CONFDIR="$TMPDIR/config/"
11 trap 'rm -rf "$TMPDIR"' EXIT
13 # make sure we don't use an old or modified system version of the filetype
14 # related configuration files
15 mkdir -p "$CONFDIR" || exit 99
16 mkdir -p "$CONFDIR/filedefs/" || exit 99
17 cp "${srcdir:-.}"/../../data/filetype_extensions.conf "$CONFDIR" || exit 99
18 cp "${srcdir:-.}"/../../data/filetypes.* "$CONFDIR/filedefs/" || exit 99
20 result="$1"
21 source="${result%.*}"
22 tagfile="$TMPDIR/test.${source##*.}.tags"
24 "$GEANY" -c "$CONFDIR" -P -g "$tagfile" "$source" || exit 1
25 diff -u "$result" "$tagfile" || exit 2