changeset 26526:75c7aafca6bb stable

test for bug #54995 * test/bug-54995/module.mk, test/bug-54995/@testclass/subsref.m, test/bug-54995/@testclass/testclass.m, test/bug-54995/bug-54995.tst: New files. * test/module.mk: Update.
author Guillaume Flandin <guillaume.offline@gmail.com>
date Sat, 12 Jan 2019 08:14:40 -0500
parents 0d3eca5955dc
children cd73f8e9235f 9a91f675fd5f
files test/bug-54995/@testclass/subsref.m test/bug-54995/@testclass/testclass.m test/bug-54995/bug-54995.tst test/bug-54995/module.mk test/module.mk
diffstat 5 files changed, 35 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/bug-54995/@testclass/subsref.m	Sat Jan 12 08:14:40 2019 -0500
@@ -0,0 +1,3 @@
+function val = subsref (obj, S)
+  val = builtin ("subsref", obj, S);
+endfunction
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/bug-54995/@testclass/testclass.m	Sat Jan 12 08:14:40 2019 -0500
@@ -0,0 +1,4 @@
+function obj = testclass ()
+  obj = struct ("x", eye (4));
+  obj = class(obj, "testclass");
+endfunction
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/bug-54995/bug-54995.tst	Sat Jan 12 08:14:40 2019 -0500
@@ -0,0 +1,21 @@
+## Copyright (C) 2018 Guillaume Flandin
+##
+## 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 <*54995>
+%! obj = testclass ();
+%! assert (obj.x(1), 1);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/bug-54995/module.mk	Sat Jan 12 08:14:40 2019 -0500
@@ -0,0 +1,6 @@
+bug_54995_TEST_FILES = \
+  %reldir%/@testclass/testclass.m \
+  %reldir%/@testclass/subsref.m \
+  %reldir%/bug-54995.tst
+
+TEST_FILES += $(bug_54995_TEST_FILES)
--- a/test/module.mk	Sat Jan 12 08:09:02 2019 -0500
+++ b/test/module.mk	Sat Jan 12 08:14:40 2019 -0500
@@ -75,6 +75,7 @@
 include %reldir%/bug-52075/module.mk
 include %reldir%/bug-52722/module.mk
 include %reldir%/bug-53027/module.mk
+include %reldir%/bug-54995/module.mk
 include %reldir%/class-concat/module.mk
 include %reldir%/classdef/module.mk
 include %reldir%/classdef-multiple-inheritance/module.mk