File: diff-highlight-color-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 (60 lines) | stat: -rwxr-xr-x 1,640 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
#!/bin/sh

. libtest.sh
. libgit.sh

test_require diff-highlight

export PATH="$(dirname -- "$diff_highlight_path"):$PATH"

gitconfig <<EOF
[color.diff-highlight]
  oldnormal=red bold
  oldhighlight=red bold 52
  newnormal=green bold
  newhighlight=green bold 22
EOF

tigrc <<EOF
set diff-highlight = true
EOF

steps '
	:save-display diff-highlight-with-custom-colors.screen
'

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

test_tig show master^

assert_equals 'diff-highlight-with-custom-colors.screen' <<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

    Add type parameter for js.Dynamic
---
 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