• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2#
3# Copyright (C) 2017 and later: Unicode, Inc. and others.
4# License & terms of use: http://www.unicode.org/copyright.html
5#
6# Copyright (C) 2010-2012 IBM Corporation and Others, All Rights Reserved.
7
8if [ $# -eq 1 ];
9then
10    VERBOSE=1
11else
12    VERBOSE=0
13fi
14
15function verbose()
16{
17    if [ ${VERBOSE} -eq 1 ];
18    then
19        echo "$*"
20    else
21        echo -n .
22    fi
23}
24
25function c()
26{
27    IN=$1
28    EXP=$2
29    OUT=`./icu2symver.sh $IN`
30    if [ "x${OUT}" != "x${EXP}" ];
31    then
32        echo "Error: \"${IN}\" -> \"${OUT}\", expected ${EXP}" >&2
33        exit 1
34    else
35        verbose "${IN} -> ${OUT}"
36    fi
37
38    OUT=`echo ${IN} | ./icu2symver.sh`
39    if [ "x${OUT}" != "x${EXP}" ];
40    then
41        echo "Error: \"${IN}\" -> \"${OUT}\", expected ${EXP} (via stream)" >&2
42        exit 1
43    else
44        verbose "${IN} -> ${OUT} (via stream)"
45    fi
46}
47
48c	'3.6.2'		'36'
49c	'1.0'		'10'
50c	'4.8'		'48'
51c	'4.8.1.1'	'48'
52c	'4.0.2'		'40'
53c	'4.1.2'		'41'
54c	'49.1.2'	'49'
55c	'49'		'49'
56c	'50.0.3'	'50'
57c	'51.0.0.1'	'51'
58
59echo " OK!"
60
61exit 0
62