Commit b76e47b
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 4c379f2 commit b76e47b
1 file changed
+7
-7
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 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
0 commit comments