Commit 96d44ea
committed
Fix string replacements in lreprstruct test
The previous logic caused problems if "GRAIN" appeared in two (or more)
strings, where one was a substring of the other. For example, in
LREPRSTRUCT_Ly1_P128x1.f10_f10_mg37.I1850Clm50BgcCrop.derecho_gnu.clm-ciso--clm-cropMonthOutput,
before this replacement, one line contained 'GRAINN_TO_FOOD' and a later
line contained (among other things) "'GRAINN_TO_FOOD_PERHARV',
'GRAINN_TO_FOOD_ANN'". This was problematic because the first
replacement of GRAINN_TO_FOOD incorrectly led to replacements in the
later strings as well.
This new logic should solve this issue.
Resolves #33131 parent e9ecc53 commit 96d44ea
1 file changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | | - | |
| 64 | + | |
62 | 65 | | |
| 66 | + | |
| 67 | + | |
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
| |||
0 commit comments