Re: [PATCH V5 16/17] Add tests for line history browser
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Aug 12, 2010, 01:25 UTC
- Message-ID
- <AANLkTi=qvywaiwYpr7ZZ6Gf0i_curaLr0E8gRLD5WTK-@mail.gmail.com>
- In-Reply-To
- <1281539022-31616-17-git-send-email-struggleyb.nku@gmail.com>
On Wed, Aug 11, 2010 at 15:03, Bo Yang <struggleyb.nku@gmail.com> wrote:
Show 5 quoted lines
> t/t4301-log-line-single-history.sh: > test the linear line of history. > > t/t4302-log-line-merge-history.sh: > test the case that there are merges in the history.
This is failing smoke tests on my smoker: http://smoke.git.nix.is/app/projects/report_details/21
> Signed-off-by: Bo Yang <struggleyb.nku@gmail.com>
> +test_expect_success 'validate the path0 output.' ' > + test_cmp current-path0 expected-path0 > +'
That gives me:
$ diff -ru trash\
directory.t4301-log-line-single-history/{expected,current}-path0
--- trash directory.t4301-log-line-single-history/expected-path0
2010-08-12 01:20:18.000000000 +0000
+++ trash directory.t4301-log-line-single-history/current-path0
2010-08-12 01:20:18.000000000 +0000
@@ -6,8 +6,8 @@
+++ b/path0
@@ -1,6 +1,5 @@
void func(){
- int a = 10;
- int b = 11;
+ int a = 10;
+ int b = 11;
- int c;
- c = 10 * (a + b);
+ printf("%d", a - b);
@@ -21,9 +21,9 @@
+++ b/path0
@@ -1,6 +1,6 @@
void func(){
- int a = 10;
- int b = 11;
- int c;
+ int a = 10;
+ int b = 11;
+ int c;
- c = a + b;
+ c = 10 * (a + b);
}
@@ -40,8 +40,8 @@
- int b = 1;
+ int a = 10;
+ int b = 11;
- int c;
- c = a + b;
+ int c;
+ c = a + b;
}Base commit
> [...]
More of these test fails, see the TAP output at the smoker.
> diff --git a/t/t4302-log-line-merge-history.sh b/t/t4302-log-line-merge-history.sh > new file mode 100755 > index 0000000..1536cc4 > --- /dev/null
[...]
> +test_expect_success \ > + 'validate the output.' \ > + 'test_cmp current expected'
Gives:
$ diff -ru trash\ directory.t4302-log-line-merge-history/{expected,current}
--- trash directory.t4302-log-line-merge-history/expected
2010-08-12 01:21:47.000000000 +0000
+++ trash directory.t4302-log-line-merge-history/current
2010-08-12 01:21:47.000000000 +0000
@@ -3,7 +3,7 @@
nontrivial merge found
path0
@@ 2,1 @@
- printf("hello earth and moon");
+ printf("hello earth and moon");Change path0 in master
That's just a whitespace change, the diff goes away on diff -w.
> +test_expect_success \ > + 'validate the graph output.' \ > + 'test_cmp current-graph expected-graph' > +
More whitespace changes:
$ diff -ru trash\
directory.t4302-log-line-merge-history/{expected,current}-graph
--- trash directory.t4302-log-line-merge-history/expected-graph
2010-08-12 01:23:53.000000000 +0000
+++ trash directory.t4302-log-line-merge-history/current-graph
2010-08-12 01:23:53.000000000 +0000
@@ -1,14 +1,14 @@
* Merge two branches
-|\
-| |
+|\
+| |
| | nontrivial merge found
| | path0
| | @@ 2,1 @@
| | printf("hello earth and moon");
-| |
-| |
+| |
+| |
| * Change path0 in master
-| |
+| |
| | diff --git a/path0 b/path0
| | index f628dea..bef7fa3 100644
| | --- a/path0
@@ -16,10 +16,10 @@
| | @@ -2,1 +2,1 @@
| | - printf("hello");
| | + printf("hello earth");
-| |
+| |
* | Change path0 in feature
-|/
-|
+|/
+|
| diff --git a/path0 b/path0
| index f628dea..a940ef6 100644
| --- a/path0
@@ -27,9 +27,9 @@
| @@ -2,1 +2,1 @@
| - printf("hello");
| + print("hello moon");
-|
+|
* Base commit
-
+
diff --git a/path0 b/path0
new file mode 100644
index 0000000..f628dea