+sub fixup_expect ($$) {
+
+ # Fixes up the expected results by inserting the boiler plate text.
+ # Returns empty string if that is what is expected. Otherwise, handles
+ # either a scalar, turning it into a single element array; or a ref to an
+ # array, adjusting each element. If called in array context, returns an
+ # array, otherwise the join of all elements.
+
+ # The string $only_strict_marker will be removed from any expect line it
+ # begins, and if $strict is not true, that expect line will be removed
+ # from the output (hence won't be expected)
+
+ my ($expect_ref, $strict) = @_;