changeset 32903:9aeb66a38955

maint: merge stable to default
author Rik <rik@octave.org>
date Thu, 01 Feb 2024 15:54:10 -0800
parents af3d1dec5e5d (current diff) a575aa730d84 (diff)
children 81d1512a47cb
files test/Makefile.am
diffstat 2 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/Makefile.am	Thu Feb 01 13:28:57 2024 -0500
+++ b/test/Makefile.am	Thu Feb 01 15:54:10 2024 -0800
@@ -17,6 +17,7 @@
 
 TEST_FILES += \
   fntests.m \
+  anonymous-function.tst \
   args.tst \
   bug-31371.tst \
   bug-40117.tst \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/anonymous-function.tst	Thu Feb 01 15:54:10 2024 -0800
@@ -0,0 +1,30 @@
+########################################################################
+##
+## Copyright (C) 2024 The Octave Project Developers
+##
+## See the file COPYRIGHT.md in the top-level directory of this
+## distribution or <https://octave.org/copyright/>.
+##
+## This file is part of Octave.
+##
+## Octave is free software: you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <https://www.gnu.org/licenses/>.
+##
+########################################################################
+
+%!test <*64783>
+%! s = struct ('re',{pi,2}, 'im',{3,4});
+%! f = @(x) x.re ;
+%! f(s);
+%! assert (ans, pi);