Skip to content

Commit d90325c

Browse files
kerneltoastclaude
andcommitted
tests: Update fuzzy mode expected output
Update expected output for fuzzy1-9 tests to reflect the new section-based output format and improved hunk matching. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 114454a commit d90325c

8 files changed

Lines changed: 321 additions & 338 deletions

File tree

tests/fuzzy1/run-test

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,42 @@ cat << 'EOF' > patch2
3333
EOF
3434

3535
cat << 'EOF' > expected
36-
diff -u file file
36+
================================================================================
37+
* DELTA DIFFERENCES - code changes that differ between the patches *
38+
================================================================================
39+
3740
--- file
3841
+++ file
39-
@@ -1,4 +1,4 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
40-
-line 1
41-
+LINE 1
42+
@@ -1,4 +1,4 @@
43+
-LINE 1
44+
+line 1
4245
line 2
4346
line 3
4447
line 4
48+
49+
################################################################################
50+
! REJECTED PATCH2 HUNKS - could not be compared; manual review needed !
51+
################################################################################
52+
53+
--- file
54+
+++ file
55+
@@ -5,9 +5,6 @@
56+
line 5
57+
if
58+
1
59+
-fi
60+
-if
61+
-2
62+
fi
63+
A
64+
B
65+
66+
================================================================================
67+
* CONTEXT DIFFERENCES - surrounding code differences between the patches *
68+
================================================================================
69+
70+
--- file
71+
+++ file
4572
@@ -1,4 +1,9 @@
4673
-line 1
4774
-line 2
@@ -56,16 +83,7 @@ diff -u file file
5683
+fi
5784
+A
5885
+B
59-
@@ -5,9 +5,6 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
60-
line 5
61-
if
62-
1
63-
-fi
64-
-if
65-
-2
66-
fi
67-
A
68-
B
86+
6987
EOF
7088

7189
${INTERDIFF} --fuzzy patch1 patch2 2>errors >output

tests/fuzzy3/run-test

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,17 @@ cat << 'EOF' > patch2
3737
EOF
3838

3939
cat << 'EOF' > expected
40-
diff -u file file
40+
================================================================================
41+
* CONTEXT DIFFERENCES - surrounding code differences between the patches *
42+
================================================================================
43+
4144
--- file
4245
+++ file
43-
@@ -47,6 +47,6 @@
44-
-line 5
45-
+line 6
46-
if
47-
1
46+
@@ -7,3 +8,2 @@
4847
fi
4948
-A
5049
B
51-
+C
50+
5251
EOF
5352

5453
${INTERDIFF} --fuzzy patch1 patch2 2>errors >output

tests/fuzzy4/run-test

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,28 @@ cat << 'EOF' > patch2
3939
EOF
4040

4141
cat << 'EOF' > expected
42-
diff -u file file
42+
================================================================================
43+
* DELTA DIFFERENCES - code changes that differ between the patches *
44+
================================================================================
45+
4346
--- file
4447
+++ file
45-
@@ -2,8 +2,9 @@
46-
+line 6
47-
if
48+
@@ -7,4 +7,7 @@
4849
1
4950
fi
50-
if
51-
2
52-
fi
53-
-A
54-
B
55-
+C
56-
@@ -5,9 +5,6 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
57-
line 5
58-
if
59-
1
60-
-fi
61-
-if
62-
-2
63-
fi
51+
+if
52+
+2
53+
+fi
6454
A
6555
B
66-
@@ -50,9 +50,6 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
56+
57+
################################################################################
58+
! REJECTED PATCH2 HUNKS - could not be compared; manual review needed !
59+
################################################################################
60+
61+
--- file
62+
+++ file
63+
@@ -50,9 +50,6 @@
6764
line 6
6865
if
6966
1
@@ -73,6 +70,18 @@ diff -u file file
7370
fi
7471
B
7572
C
73+
74+
================================================================================
75+
* CONTEXT DIFFERENCES - surrounding code differences between the patches *
76+
================================================================================
77+
78+
--- file
79+
+++ file
80+
@@ -7,3 +8,2 @@
81+
fi
82+
-A
83+
B
84+
7685
EOF
7786

7887
${INTERDIFF} --fuzzy=1 patch1 patch2 2>errors >output

tests/fuzzy5/run-test

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -61,49 +61,32 @@ cat << 'EOF' > patch2
6161
EOF
6262

6363
cat << 'EOF' > expected
64-
diff -u file file
64+
================================================================================
65+
* DELTA DIFFERENCES - code changes that differ between the patches *
66+
================================================================================
67+
6568
--- file
6669
+++ file
67-
@@ -2 +2,7 @@
68-
-line 5
69-
+D
70-
+Z
71-
+1
72-
+1
73-
+F
74-
+E
75-
+if
76-
@@ -3,8 +9,9 @@
77-
+line 6
78-
if
79-
1
80-
fi
81-
if
82-
2
83-
fi
84-
-A
85-
B
86-
+C
87-
@@ -5,9 +5,6 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
88-
line 5
70+
@@ -6,8 +6,8 @@
8971
if
9072
1
91-
-fi
92-
-if
93-
-2
9473
fi
74+
+if
75+
+2
76+
+fi
9577
A
9678
B
97-
@@ -7,7 +7,7 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
98-
C
99-
9
100-
8
101-
-1
102-
+7
103-
D
104-
E
105-
if
106-
@@ -50,9 +50,6 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
79+
-D
80+
-E
81+
-if
82+
83+
################################################################################
84+
! REJECTED PATCH2 HUNKS - could not be compared; manual review needed !
85+
################################################################################
86+
87+
--- file
88+
+++ file
89+
@@ -50,9 +50,6 @@
10790
line 6
10891
if
10992
1
@@ -113,7 +96,7 @@ diff -u file file
11396
fi
11497
B
11598
C
116-
@@ -7,7 +7,7 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
99+
@@ -7,7 +7,7 @@
117100
D
118101
Z
119102
1
@@ -122,6 +105,20 @@ diff -u file file
122105
F
123106
E
124107
if
108+
109+
================================================================================
110+
* CONTEXT DIFFERENCES - surrounding code differences between the patches *
111+
================================================================================
112+
113+
--- file
114+
+++ file
115+
@@ -2 +2,0 @@
116+
-line 5
117+
@@ -8,3 +15,2 @@
118+
fi
119+
-A
120+
B
121+
125122
EOF
126123

127124
${INTERDIFF} --fuzzy=1 patch1 patch2 2>errors >output

tests/fuzzy6/run-test

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,23 @@ cat << 'EOF' > patch2
3131
EOF
3232

3333
cat << 'EOF' > expected
34-
diff -u file file
34+
################################################################################
35+
! REJECTED PATCH2 HUNKS - could not be compared; manual review needed !
36+
################################################################################
37+
3538
--- file
3639
+++ file
37-
@@ -2,2 +2,5 @@
38-
+hi
39-
+line 4
40-
line 5
41-
if
42-
+2
43-
@@ -50,5 +50,4 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
40+
@@ -50,5 +50,4 @@
4441
hi
4542
line 4
4643
-line 5
4744
if
4845
2
49-
@@ -53,2 +52,3 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
46+
@@ -53,2 +52,3 @@
5047
if
5148
+1
5249
2
50+
5351
EOF
5452

5553
${INTERDIFF} --fuzzy=1 patch1 patch2 2>errors >output

0 commit comments

Comments
 (0)