-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: do not rely on external "patch"
Some of our tests assumed a working "patch" command to produce expected results when checking "git-apply", but some systems have broken "patch". We can compare our output with expected output that is precomputed instead to sidestep this issue. Signed-off-by: Junio C Hamano <gitster@pobox.com>
- Loading branch information
Junio C Hamano
committed
Jul 22, 2008
1 parent
c79cc2e
commit ac2e28c
Showing
11 changed files
with
190 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include <stdlib.h> | ||
#include <stdio.h> | ||
|
||
int func(int num); | ||
void print_int(int num); | ||
void print_ln(); | ||
|
||
int main() { | ||
int i; | ||
|
||
for (i = 0; i < 10; i++) { | ||
print_int(func(i)); | ||
} | ||
|
||
print_ln(); | ||
|
||
return 0; | ||
} | ||
|
||
int func(int num) { | ||
return num * num; | ||
} | ||
|
||
void print_int(int num) { | ||
printf("%d", num); | ||
} | ||
|
||
void print_ln() { | ||
printf("\n"); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <stdio.h> | ||
|
||
int func(int num); | ||
void print_int(int num); | ||
|
||
int main() { | ||
int i; | ||
|
||
for (i = 0; i < 10; i++) { | ||
print_int(func(i)); | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
int func(int num) { | ||
return num * num; | ||
} | ||
|
||
void print_int(int num) { | ||
printf("%d", num); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <stdio.h> | ||
|
||
int func(int num); | ||
int func2(int num); | ||
|
||
int main() { | ||
int i; | ||
|
||
for (i = 0; i < 10; i++) { | ||
printf("%d", func(i)); | ||
printf("%d", func3(i)); | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
int func(int num) { | ||
return num * num; | ||
} | ||
|
||
int func2(int num) { | ||
return num * num * num; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
a1 | ||
a11 | ||
a111 | ||
a1111 | ||
b1 | ||
b11 | ||
b111 | ||
b1111 | ||
b2 | ||
b22 | ||
b222 | ||
b2222 | ||
c1 | ||
c11 | ||
c111 | ||
c1111 | ||
c2 | ||
c22 | ||
c222 | ||
c2222 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/new.txt b/new.txt | ||
new file mode 100644 | ||
--- /dev/null | ||
+++ b/new.txt | ||
@@ -0,0 +1,12 @@ | ||
+a1 | ||
+a11 | ||
+a111 | ||
+a1111 | ||
+b1 | ||
+b11 | ||
+b111 | ||
+b1111 | ||
+c1 | ||
+c11 | ||
+c111 | ||
+c1111 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff --git a/new.txt b/new.txt | ||
--- a/new.txt | ||
+++ b/new.txt | ||
@@ -1,7 +1,3 @@ | ||
-a1 | ||
-a11 | ||
-a111 | ||
-a1111 | ||
b1 | ||
b11 | ||
b111 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/new.txt b/new.txt | ||
--- a/new.txt | ||
+++ b/new.txt | ||
@@ -6,6 +6,10 @@ | ||
b11 | ||
b111 | ||
b1111 | ||
+b2 | ||
+b22 | ||
+b222 | ||
+b2222 | ||
c1 | ||
c11 | ||
c111 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff --git a/new.txt b/new.txt | ||
--- a/new.txt | ||
+++ b/new.txt | ||
@@ -1,3 +1,7 @@ | ||
+a1 | ||
+a11 | ||
+a111 | ||
+a1111 | ||
b1 | ||
b11 | ||
b111 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff --git a/new.txt b/new.txt | ||
--- a/new.txt | ||
+++ b/new.txt | ||
@@ -10,3 +10,7 @@ | ||
c11 | ||
c111 | ||
c1111 | ||
+c2 | ||
+c22 | ||
+c222 | ||
+c2222 |