test/sun/tools/native2ascii/Native2AsciiTests.sh

Print this page




  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22 # CA 95054 USA or visit www.sun.com if you need additional information or
  23 # have any questions.
  24 #
  25 
  26 # @test
  27 # @bug 4630463 4630971 4636448 4701617 4721296 4710890 6247817
  28 # @summary Tests miscellaneous native2ascii bugfixes and regressions
  29 
  30 
  31 if [ "${TESTSRC}" = "" ]; then TESTSRC=.; fi
  32 if [ "${TESTJAVA}" = "" ]; then TESTJAVA=$1; shift; fi
  33 
  34 case `uname -s` in
  35   Windows*) OS=Windows;;
  36   SunOS|Linux) OS=Unix;;
  37 esac
  38 
  39 N2A=$TESTJAVA/bin/native2ascii
  40 
  41 check() {
  42   bug=$1; shift
  43   expected=$1; shift
  44   out=$1; shift
  45 
  46   # Strip carriage returns from output when comparing with n2a test output
  47   # on win32 systems
  48   if [ OS = Windows ]; then
  49      tr -d '\015' <$out >$out.1
  50   else
  51      cp $out $out.1
  52   fi
  53   if (set -x; diff -c $expected $out.1); then
  54     echo "$bug passed"
  55   else




  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22 # CA 95054 USA or visit www.sun.com if you need additional information or
  23 # have any questions.
  24 #
  25 
  26 # @test
  27 # @bug 4630463 4630971 4636448 4701617 4721296 4710890 6247817
  28 # @summary Tests miscellaneous native2ascii bugfixes and regressions
  29 
  30 
  31 if [ "${TESTSRC}" = "" ]; then TESTSRC=.; fi
  32 if [ "${TESTJAVA}" = "" ]; then TESTJAVA=$1; shift; fi
  33 
  34 case `uname -s` in
  35   Windows* | CYGWIN*) OS=Windows;;
  36   SunOS|Linux) OS=Unix;;
  37 esac
  38 
  39 N2A=$TESTJAVA/bin/native2ascii
  40 
  41 check() {
  42   bug=$1; shift
  43   expected=$1; shift
  44   out=$1; shift
  45 
  46   # Strip carriage returns from output when comparing with n2a test output
  47   # on win32 systems
  48   if [ OS = Windows ]; then
  49      tr -d '\015' <$out >$out.1
  50   else
  51      cp $out $out.1
  52   fi
  53   if (set -x; diff -c $expected $out.1); then
  54     echo "$bug passed"
  55   else