~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to tests/misc/sort-version.sh

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# exercise sort's --sort=version option
 
3
 
 
4
# Copyright (C) 2008-2012 Free Software Foundation, Inc.
 
5
 
 
6
# This program is free software: you can redistribute it and/or modify
 
7
# it under the terms of the GNU General Public License as published by
 
8
# the Free Software Foundation, either version 3 of the License, or
 
9
# (at your option) any later version.
 
10
 
 
11
# This program 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
 
14
# GNU General Public License for more details.
 
15
 
 
16
# You should have received a copy of the GNU General Public License
 
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
 
 
19
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 
20
print_ver_ sort
 
21
 
 
22
cat > in << _EOF_
 
23
gcc-c++-10.fc9.tar.gz
 
24
gcc-c++-10.8.12-0.7rc2.fc9.tar.bz2
 
25
glibc-2-0.1.beta1.fc10.rpm
 
26
glibc-common-5-0.2.beta2.fc9.ebuild
 
27
glibc-common-5-0.2b.deb
 
28
glibc-common-11b.ebuild
 
29
glibc-common-11-0.6rc2.ebuild
 
30
libstdc++-0.5.8.11-0.7rc2.fc10.tar.gz
 
31
libstdc++-4a.fc8.tar.gz
 
32
libstdc++-4.10.4.20040204svn.rpm
 
33
libstdc++-devel-3.fc8.ebuild
 
34
libstdc++-devel-3a.fc9.tar.gz
 
35
libstdc++-devel-8.fc8.deb
 
36
libstdc++-devel-8.6.2-0.4b.fc8
 
37
nss_ldap-1-0.2b.fc9.tar.bz2
 
38
nss_ldap-1-0.6rc2.fc8.tar.gz
 
39
nss_ldap-1.0-0.1a.tar.gz
 
40
nss_ldap-10beta1.fc8.tar.gz
 
41
nss_ldap-10.11.8.6.20040204cvs.fc10.ebuild
 
42
string start 5.0.0 end of str
 
43
string start 5.1.0 end of str
 
44
string start 5.10.0 end of str
 
45
string start 5.2.0 end of str
 
46
string start 5.20.0 end of str
 
47
string start 5.3.0 end of str
 
48
string start 5.30.0 end of str
 
49
string start 5.4.0 end of str
 
50
string start 5.40.0 end of str
 
51
string start 5.5.0 end of str
 
52
string start 5.50.0 end of str
 
53
string start 5.6.0 end of str
 
54
string start 5.60.0 end of str
 
55
string start 5.7.0 end of str
 
56
string start 5.70.0 end of str
 
57
string start 5.8.0 end of str
 
58
string start 5.80.0 end of str
 
59
string start 5.9.0 end of str
 
60
string start 5.90.0 end of str
 
61
_EOF_
 
62
 
 
63
cat > exp << _EOF_
 
64
gcc-c++-10.fc9.tar.gz
 
65
gcc-c++-10.8.12-0.7rc2.fc9.tar.bz2
 
66
glibc-2-0.1.beta1.fc10.rpm
 
67
glibc-common-5-0.2.beta2.fc9.ebuild
 
68
glibc-common-5-0.2b.deb
 
69
glibc-common-11b.ebuild
 
70
glibc-common-11-0.6rc2.ebuild
 
71
libstdc++-0.5.8.11-0.7rc2.fc10.tar.gz
 
72
libstdc++-4a.fc8.tar.gz
 
73
libstdc++-4.10.4.20040204svn.rpm
 
74
libstdc++-devel-3.fc8.ebuild
 
75
libstdc++-devel-3a.fc9.tar.gz
 
76
libstdc++-devel-8.fc8.deb
 
77
libstdc++-devel-8.6.2-0.4b.fc8
 
78
nss_ldap-1-0.2b.fc9.tar.bz2
 
79
nss_ldap-1-0.6rc2.fc8.tar.gz
 
80
nss_ldap-1.0-0.1a.tar.gz
 
81
nss_ldap-10beta1.fc8.tar.gz
 
82
nss_ldap-10.11.8.6.20040204cvs.fc10.ebuild
 
83
string start 5.0.0 end of str
 
84
string start 5.1.0 end of str
 
85
string start 5.2.0 end of str
 
86
string start 5.3.0 end of str
 
87
string start 5.4.0 end of str
 
88
string start 5.5.0 end of str
 
89
string start 5.6.0 end of str
 
90
string start 5.7.0 end of str
 
91
string start 5.8.0 end of str
 
92
string start 5.9.0 end of str
 
93
string start 5.10.0 end of str
 
94
string start 5.20.0 end of str
 
95
string start 5.30.0 end of str
 
96
string start 5.40.0 end of str
 
97
string start 5.50.0 end of str
 
98
string start 5.60.0 end of str
 
99
string start 5.70.0 end of str
 
100
string start 5.80.0 end of str
 
101
string start 5.90.0 end of str
 
102
_EOF_
 
103
 
 
104
sort --sort=version -o out in || fail=1
 
105
compare exp out || fail=1
 
106
Exit $fail