Changeset 4351


Ignore:
Timestamp:
Feb 9, 2010, 1:45:18 AM (8 years ago)
Author:
Sam Hocevar
Message:

Get rid of pushd/popd in the testsuite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/test/check-source

    r4333 r4351  
    88nlines=0
    99for dir in caca kernel src cxx examples ruby tools; do
    10   pushd ../$dir >/dev/null
    11   for x in $(make -s echo-sources); do
     10  for x in $(make -s echo-sources -C ../$dir); do
    1211    case "$x" in
    1312      *.c|*.cpp|*.h|*.m)
    1413        nfiles=$(($nfiles + 1));
    15         nlines=$(($nlines + `grep -c . "$x"`)) ;;
     14        nlines=$(($nlines + `grep -c . "../$dir/$x"`)) ;;
    1615      *)
    1716        continue ;;
    1817    esac
    19     if grep '[[:space:]]$' "$x" >/dev/null 2>&1; then
     18    if grep '[[:space:]]$' "../$dir/$x" >/dev/null 2>&1; then
    2019      echo "error: $dir/$x contains trailing spaces"
    2120      nfails=$(($nfails + 1))
    2221    fi
    23     if grep '   ' "$x" >/dev/null 2>&1; then
     22    if grep '   ' "../$dir/$x" >/dev/null 2>&1; then
    2423      echo "error: $dir/$x contains tabs"
    2524      nfails=$(($nfails + 1))
    2625    fi
    2726  done
    28   popd >/dev/null
    2927done
    3028
Note: See TracChangeset for help on using the changeset viewer.