# Copyright (c) 2015-2026, 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])