File: diff-highlight-test

package info (click to toggle)
tig 2.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,188 kB
  • sloc: ansic: 36,941; sh: 10,934; makefile: 394
file content (121 lines) | stat: -rwxr-xr-x 1,998 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/bin/sh

. libtest.sh
. libgit.sh

in_work_dir create_repo_from_tgz "$base_dir/files/scala-js-benchmarks.tgz"

file bin/diff-highlight <<EOF
#!/bin/sh
exec sed 's/Add type parameter for js.Dynamic/Changed by diff-highlight/'
EOF

chmod +x bin/diff-highlight

test_case diff-highlight-true \
	--tigrc='set diff-highlight = true' \
	--args='show master^' \
	--subshell='export PATH="./bin:$PATH"' \
	<<EOF
commit a1dcf1aaa11470978db1d5d8bcf9e16201eb70ff
Author:     Jonas Fonseca <jonas.fonseca@gmail.com>
AuthorDate: Sat Mar 1 15:59:02 2014 -0500
Commit:     Jonas Fonseca <jonas.fonseca@gmail.com>
CommitDate: Sat Mar 1 15:59:02 2014 -0500

    Changed by diff-highlight
---
 common/src/main/scala/org/scalajs/benchmark/Benchmark.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/src/main/scala/org/scalajs/benchmark/Benchmark.scala b/commo
index 65f914a..3aa4320 100644
--- a/common/src/main/scala/org/scalajs/benchmark/Benchmark.scala
+++ b/common/src/main/scala/org/scalajs/benchmark/Benchmark.scala
@@ -15,7 +15,7 @@ object Benchmark {
   val benchmarks = js.Array[Benchmark]()
   val benchmarkApps = js.Array[BenchmarkApp]()

-  val global = js.Dynamic.global.asInstanceOf[js.Dictionary]
+  val global = js.Dynamic.global.asInstanceOf[js.Dictionary[js.Any]]
   global("runScalaJSBenchmarks") = runBenchmarks _
   global("initScalaJSBenchmarkApps") = initBenchmarkApps _





[diff] a1dcf1aaa11470978db1d5d8bcf9e16201eb70ff - line 1 of 24              100%
EOF

test_case diff-highlight-custom \
	--tigrc='set diff-highlight = wc' \
	--args='show master^' \
	<<EOF
24      85    1067



























[diff] HEAD - line 1 of 1                                                   100%
EOF

test_case diff-highlight-misconfigured \
	--tigrc='set diff-highlight = program-that-does-not-exist' \
	--args='show master^' \
	<<EOF




























[diff]                                                                        0%
EOF

run_test_cases