#!/bin/sh

. libtest.sh
. libgit.sh

export LINES=16

touch stderr

tigrc <<EOF
set line-graphics = utf-8
set main-view	= date:default author:abbreviated commit-title:yes,graph,refs=no,overflow=no
EOF

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

test_tig_script() {
	name="$1"; shift

	tig_script "$name" "
		:view-main
		:save-display $name.screen
	"

	cat > "$name.expected"

	test_tig "$@"

	assert_equals "$name.screen" < "$name.expected"
	assert_equals "$name.stderr" <<-EOF
	EOF
}

test_tig_script 'follow' --follow project/Build.scala <<EOF
2014-03-01 17:26 -0500 JFonseca  WIP: Upgrade to 0.4-SNAPSHOT and DCE
2013-11-26 20:13 -0500 JFonseca  Rename projects to be grouped together in Eclip
2013-11-11 01:11 -0500 JFonseca  Add initial version of sudoku benchmark
2013-10-29 18:46 +0100 SDoeraene Update for new groupId and package structure of
2013-10-18 18:00 -0400 JFonseca  Add DeltaBlue benchmark
2013-10-17 20:34 -0400 JFonseca  Add Richards benchmark
2013-10-17 20:25 -0400 JFonseca  Simplify creation of new benchmark projects
2013-10-14 13:15 -0400 JFonseca  Initial import of Tracer benchmark
 
 
 
 
 
 
[main] ee912870202200a0b9cf4fd86ba57243212d341e - commit 1 of 8             100%
EOF

test_tig_script 'first-parent' --first-parent <<EOF
2014-03-01 17:26 -0500 JFonseca ∙ WIP: Upgrade to 0.4-SNAPSHOT and DCE
2014-03-01 15:59 -0500 JFonseca ∙ Add type parameter for js.Dynamic
2014-01-16 22:51 -0500 JFonseca ∙ Move classes under org.scalajs.benchmark packa
2014-01-16 17:43 -0500 JFonseca ∙ Bump Scala.js version to 0.3-SNAPSHOT
2014-01-16 17:39 -0500 JFonseca ∙ Integrate app code into the benchmark infrastr
2014-01-16 07:47 -0800 JFonseca ∙ Merge pull request #4 from phaller/patch-1
2013-12-17 00:02 +0100 JFonseca ∙ Update links to reflect project name change
2013-12-03 23:35 -0500 JFonseca ∙ Use Scala.js 0.2-SNAPSHOT
2013-11-26 23:39 -0500 JFonseca ∙ Extract the benchmark list variable name; fix
2013-11-26 23:31 -0500 JFonseca ∙ Solve the easiest sudoku grid
2013-11-26 23:22 -0500 JFonseca ∙ Disable phantomjs by default
2013-11-26 22:55 -0500 JFonseca ∙ Exclude Sudoku when running all benchmarks
2013-11-26 22:52 -0500 JFonseca ∙ Fix reference setup to work for node
2013-11-26 22:03 -0500 JFonseca ∙ Move benchmark registration to Scala
[main] ee912870202200a0b9cf4fd86ba57243212d341e - commit 1 of 44             31%
EOF
