changeset 33202:cab636a9c37b

maint: merge stable to default
author Rik <rik@octave.org>
date Tue, 12 Mar 2024 22:07:22 -0700
parents 9f97974976cd (current diff) 0f9fe0289e9b (diff)
children 371217bc9733
files
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/testfun.txi	Tue Mar 12 21:47:48 2024 -0700
+++ b/doc/interpreter/testfun.txi	Tue Mar 12 22:07:22 2024 -0700
@@ -186,6 +186,12 @@
 %!shared @var{a}, @var{b}
 @end example
 
+Modifications to shared variables persist from one test to the next
+@strong{only} if the test succeeds.  Thus, if one test modifies a shared
+variable, later tests cannot know which value of the shared variable to expect
+because the pass/fail status of earlier tests is unknown.  For this reason, it
+is not recommended to modify shared variables in tests.
+
 You can also share test functions:
 
 @example