File: testsuite.at

package info (click to toggle)
libmatio 1.5.29-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,648 kB
  • sloc: sh: 126,066; ansic: 22,606; makefile: 646; python: 215
file content (187 lines) | stat: -rw-r--r-- 6,029 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# Copyright (c) 2015-2025, The matio contributors
# Copyright (c) 2010-2014, Christopher C. Hulbert
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
#    list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
#    this list of conditions and the following disclaimer in the documentation
#    and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

AT_INIT([matio testsuite])

AT_COPYRIGHT(Copyright (C) 2010-2024 Christopher C. Hulbert and the matio contributors)

AT_COLOR_TESTS

m4_divert_push([PREPARE_TESTS])
[
ovs_wait () {
    # First try a quick sleep, so that the test completes very quickly
    # in the normal case.  POSIX doesn't require fractional times to
    # work, so this might not work.
    sleep 0.1
    ovs_wait_cond && exit 0
    # Then wait up to 10 seconds.
    for d in 0 1 2 3 4 5 6 7 8 9; do
        sleep 1
        ovs_wait_cond && exit 0
    done
    exit 1
}

# Prints the integers from $1 to $2, increasing by $3 (default 1) on stdout.
seq () {
    while test $1 -le $2; do
        echo $1
        set `expr $1 + ${3-1}` $2 $3
    done
}

if test $IS_WIN32 -eq 1; then
    pwd () {
        command pwd -W "$@"
    }

    diff () {
        command diff --strip-trailing-cr "$@"
    }

    kill () {
        case "$1" in
            -0)
                shift
                for i in $*; do
                    # tasklist will always have return code 0.
                    # If pid does exist, there will be a line with the pid.
                    if tasklist //fi "PID eq $i" | grep $i; then
                        :
                    else
                        return 1
                    fi
                done
                return 0
                ;;
            -[1-9]*)
                shift
                for i in $*; do
                    taskkill //F //PID $i
                done
                ;;
            [1-9][1-9]*)
                for i in $*; do
                    taskkill //F //PID $i
                done
                ;;
        esac
    }
fi
]
m4_divert_pop([PREPARE_TESTS])

AT_BANNER(Read [MAT version 4 (Little Endian)])
m4_include([mat4_read_le.at])
m4_include([mat4_readslab_le.at])

AT_BANNER(Read [MAT version 4 (Big Endian)])
m4_include([mat4_read_be.at])
m4_include([mat4_readslab_be.at])

AT_BANNER([Read Uncompressed MAT version 5 (Little Endian)])
m4_include([mat5_uncompressed_read_le.at])
m4_include([mat5_uncompressed_readslab_le.at])

AT_BANNER([Read Compressed MAT version 5 (Little Endian)])
m4_include([mat5_compressed_read_le.at])
m4_include([mat5_compressed_readslab_le.at])

AT_BANNER([Read Uncompressed MAT version 5 (Big Endian)])
m4_include([mat5_uncompressed_read_be.at])
m4_include([mat5_uncompressed_readslab_be.at])

AT_BANNER([Read Compressed MAT version 5 (Big Endian)])
m4_include([mat5_compressed_read_be.at])
m4_include([mat5_compressed_readslab_be.at])

AT_BANNER([Read Compressed MAT version 7.3 (HDF5 Schema 1) (Little Endian)])
m4_include([mat73_compressed_read_le.at])
m4_include([mat73_compressed_readslab_le.at])

AT_BANNER([Read Uncompressed MAT version 7.3 (HDF5 Schema 1) (Little Endian)])
m4_include([mat73_uncompressed_read_le.at])
m4_include([mat73_uncompressed_readslab_le.at])

AT_BANNER([Read MAT version 7.3 (HDF5 Schema 1) (Big Endian)])
m4_include([mat73_read_be.at])
m4_include([mat73_readslab_be.at])

AT_BANNER([Write MAT version 4])
m4_include([mat4_write.at])

AT_BANNER([Read/Write MAT version 4])
m4_include([mat4_readwrite.at])

AT_BANNER([Write Uncompressed MAT version 5])
m4_include([mat5_uncompressed_write.at])

AT_BANNER([Read/Write Uncompressed MAT version 5])
m4_include([mat5_uncompressed_readwrite.at])

AT_BANNER([Write Compressed MAT version 5])
m4_include([mat5_compressed_write.at])

AT_BANNER([Read/Write Compressed MAT version 5])
m4_include([mat5_compressed_readwrite.at])

AT_BANNER([Write MAT version 7.3])
m4_include([mat73_write.at])

AT_BANNER([Write/Append MAT version 7.3])
m4_include([mat73_writeappend.at])

AT_BANNER([Read/Write Compressed MAT version 7.3])
m4_include([mat73_compressed_readwrite.at])

AT_BANNER([Read/Write Uncompressed MAT version 7.3])
m4_include([mat73_uncompressed_readwrite.at])

AT_BANNER([Write Compressed MAT version 7.3])
m4_include([mat73_compressed_write.at])

AT_BANNER([Write/Append Compressed MAT version 7.3])
m4_include([mat73_compressed_writeappend.at])

AT_BANNER([Extended Sparse MAT version 4])
m4_include([mat4_extended_sparse.at])

AT_BANNER([Extended Sparse Uncompressed MAT version 5])
m4_include([mat5_uncompressed_extended_sparse.at])

AT_BANNER([Extended Sparse Compressed MAT version 5])
m4_include([mat5_compressed_extended_sparse.at])

AT_BANNER([Extended Sparse Uncompressed MAT version 7.3])
m4_include([mat73_uncompressed_extended_sparse.at])

AT_BANNER([Extended Sparse Compressed MAT version 7.3])
m4_include([mat73_compressed_extended_sparse.at])

AT_BANNER([API Tests])
m4_include([struct_api.at])
m4_include([cell_api.at])
m4_include([subscript_api.at])