annotate scripts/testfun/__prog_output_assert__.m @ 31706:597f3ee61a48 stable

update Octave Project Developers copyright for the new year
author John W. Eaton <jwe@octave.org>
date Fri, 06 Jan 2023 13:11:27 -0500
parents 5d3faba0342e
children 2e484f9f1f18
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ########################################################################
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 ##
31706
597f3ee61a48 update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 30875
diff changeset
3 ## Copyright (C) 2005-2023 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
4 ##
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 ## See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 ## distribution or <https://octave.org/copyright/>.
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 ##
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 ## This file is part of Octave.
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 ##
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24186
diff changeset
10 ## Octave is free software: you can redistribute it and/or modify it
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 ## under the terms of the GNU General Public License as published by
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24186
diff changeset
12 ## the Free Software Foundation, either version 3 of the License, or
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
13 ## (at your option) any later version.
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 ##
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 ## Octave is distributed in the hope that it will be useful, but
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of
22755
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3a2b891d0b33 maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents: 22323
diff changeset
18 ## GNU General Public License for more details.
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
19 ##
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20 ## You should have received a copy of the GNU General Public License
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 ## along with Octave; see the file COPYING. If not, see
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 24186
diff changeset
22 ## <https://www.gnu.org/licenses/>.
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 ##
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ########################################################################
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 ## -*- texinfo -*-
30875
5d3faba0342e doc: Ensure documentation lists output argument when it exists for all m-files.
Rik <rik@octave.org>
parents: 30564
diff changeset
27 ## @deftypefn {} {@var{retval} =} __prog_output_assert__ (@var{str})
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28 ## Undocumented internal function.
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29 ## @end deftypefn
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
30
30875
5d3faba0342e doc: Ensure documentation lists output argument when it exists for all m-files.
Rik <rik@octave.org>
parents: 30564
diff changeset
31 function retval = __prog_output_assert__ (str)
24186
422814bf8b41 Use double underscores around global variables to avoid namespace conflicts.
Rik <rik@octave.org>
parents: 23220
diff changeset
32 global __assert_printf__ = "";
21758
ffad2baa90f7 maint: Use newlines to make code more readable.
Rik <rik@octave.org>
parents: 20852
diff changeset
33
24186
422814bf8b41 Use double underscores around global variables to avoid namespace conflicts.
Rik <rik@octave.org>
parents: 23220
diff changeset
34 if (isempty (__assert_printf__))
30875
5d3faba0342e doc: Ensure documentation lists output argument when it exists for all m-files.
Rik <rik@octave.org>
parents: 30564
diff changeset
35 retval = isempty (str);
24186
422814bf8b41 Use double underscores around global variables to avoid namespace conflicts.
Rik <rik@octave.org>
parents: 23220
diff changeset
36 elseif (__assert_printf__(end) == "\n")
30875
5d3faba0342e doc: Ensure documentation lists output argument when it exists for all m-files.
Rik <rik@octave.org>
parents: 30564
diff changeset
37 retval = strcmp (__assert_printf__(1:(end-1)), str);
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38 else
30875
5d3faba0342e doc: Ensure documentation lists output argument when it exists for all m-files.
Rik <rik@octave.org>
parents: 30564
diff changeset
39 retval = strcmp (__assert_printf__, str);
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40 endif
21758
ffad2baa90f7 maint: Use newlines to make code more readable.
Rik <rik@octave.org>
parents: 20852
diff changeset
41
24186
422814bf8b41 Use double underscores around global variables to avoid namespace conflicts.
Rik <rik@octave.org>
parents: 23220
diff changeset
42 __assert_printf__ = "";
21758
ffad2baa90f7 maint: Use newlines to make code more readable.
Rik <rik@octave.org>
parents: 20852
diff changeset
43
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents:
diff changeset
44 endfunction
17338
1c89599167a6 maint: End m-files with 1 blank line.
Rik <rik@octave.org>
parents: 16816
diff changeset
45
19171
702aa79dc482 Add BIST tests for various quasi-internal m-files.
Rik <rik@octave.org>
parents: 17744
diff changeset
46
702aa79dc482 Add BIST tests for various quasi-internal m-files.
Rik <rik@octave.org>
parents: 17744
diff changeset
47 ## No test coverage for internal function. It is tested through calling fcn.
702aa79dc482 Add BIST tests for various quasi-internal m-files.
Rik <rik@octave.org>
parents: 17744
diff changeset
48 %!assert (1)