~ubuntu-branches/ubuntu/vivid/fribidi/vivid

« back to all changes in this revision

Viewing changes to run.tests

  • Committer: Bazaar Package Importer
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2010-02-04 13:15:40 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100204131540-8vfnrbusid3nl3ut
Tags: 0.19.2-1
* New upstream release. (Closes: #462612)
* Switch to 3.0 (quilt) source format.
* Added LGPL2 copyright notice in debian/copyright.
* Removed fribidi-config.1 since fribidi-config is removed from upstream.
* Added THANKS file to libfribidi0.docs.
* Added debian/tmp/usr/share/man/man3/*.3 to libfribid-dev.manpages.
* debian/rules:
  + Simplify rules file.
  + remove empty manpages.
* debian/compat: Bump to 7.
* debian/control:
  + Bump debhelper version to >= 7.0.50~ in Build-Depends.
  + Bump Standards-Version to 3.8.4
  + Enhanced extended description for libfribidi0 and libfribidi-dev.
  + Added ${misc:Depends} to Depends fields.
  + Added myself to uploaders.
  + Added Vcs-* fields.
* debian/fribidi.1: Fix a typo.
* Added manpages.diff patch to fix a couple of hyphen issues in
  fribidi_remove_bidi_marks.3
* Added typos.diff patch to fix typo in fribidi help information.
* Use dh_install instead of dh_movefiles: Rename debian/*.files to 
  debian/*.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
2
 
# run.tests - Check that the algorithm does what it is supposed to
3
 
# Copyright (C) 1999,2000 Dov Grobgeld, and
4
 
# Copyright (C) 2001,2002 Behdad Esfahbod.
5
 
6
 
# This library is free software; you can redistribute it and/or
7
 
# modify it under the terms of the GNU Lesser General Public  
8
 
# License as published by the Free Software Foundation; either
9
 
# version 2.1 of the License, or (at your option) any later version.
10
 
11
 
# This library is distributed in the hope that it will be useful,  
12
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of   
13
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 
# Lesser General Public License for more details.
15
 
16
 
# You should have received a copy of the GNU Lesser General Public License  
17
 
# along with this library, in a file named COPYING; if not, write to the
18
 
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19
 
# Boston, MA 02111-1307, USA
20
 
21
 
# For licensing issues, contact <dov@imagic.weizmann.ac.il> and
22
 
# <fwpg@sharif.edu>.
23
 
 
24
 
if test -z "$srcdir"; then
25
 
  srcdir=.
26
 
  test "${VERBOSE+set}" != "set" && VERBOSE=yes
27
 
fi
28
 
 
29
 
# See how redirections should work.
30
 
if test -z "$VERBOSE"; then
31
 
   exec > /dev/null 2>&1
32
 
fi
33
 
 
34
 
path=`dirname $0`
35
 
 
36
 
if ! test -f "./fribidi"; then
37
 
  echo "run.tests: you must make fribidi first"
38
 
  exit 1
39
 
fi
40
 
 
41
 
TEST () {
42
 
  testcase="$1"
43
 
  test="${testcase##*/}"
44
 
  test="${test%.input}"
45
 
  charset="${testcase#*_}"
46
 
  charset="${charset%%_*}"
47
 
  echo -n "=== $test === "
48
 
  if ! ./fribidi --charset "$charset" </dev/null >/dev/null 2>&1; then
49
 
    echo " [Character set not supported]"
50
 
    return 0
51
 
  fi
52
 
  ./fribidi --test --charset "$charset" "$testcase" > "$test.output"
53
 
 
54
 
  reference="${testcase%.input}.reference";
55
 
  test -f "$reference" || reference="tests/${reference##*/}"
56
 
  if diff "$test.output" "$reference"; then
57
 
    rm "$test.output"
58
 
    echo " [Passed]"
59
 
    return 0
60
 
  else
61
 
    echo " [Failed]"
62
 
    return 1
63
 
  fi
64
 
}
65
 
 
66
 
retval=0
67
 
for testcase in "$path/tests/"test_*.input; do
68
 
  TEST "$testcase" || retval=1
69
 
done
70
 
 
71
 
exit $retval