#!/bin/sh

. libtest.sh
. libgit.sh

export COLUMNS=200

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

steps '
	:save-display position.screen
'

tigrc <<EOF
set line-graphics = ascii
EOF

test_tig blame deltablue/src/main/scala/org/scalajs/benchmark/deltablue/DeltaBlue.scala +42

assert_equals 'position.screen' <<EOF
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  28| // Dart by Google 2008-2010.
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  29| // Translated to Scala.js by Jonas Fonseca 2013
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  30|
296fc90 deltablue/src/main/scala/org/scalajs/benchmark/deltablue/DeltaBlue.scala Jonas Fonseca 2014-01-16 22:51 -0500  31| package org.scalajs.benchmark.deltablue
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  32|
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  33| /**
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  34|  * A Scala implementation of the DeltaBlue constraint-solving
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  35|  * algorithm, as described in:
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  36|  *
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  37|  * "The DeltaBlue Algorithm: An Incremental Constraint Hierarchy Solver"
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  38|  *   Bjorn N. Freeman-Benson and John Maloney
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  39|  *   January 1990 Communications of the ACM,
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  40|  *   also available as University of Washington TR 89-08-06.
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  41|  *
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  42|  * Beware: this benchmark is written in a grotesque style where
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  43|  * the constraint model is built by side-effects from constructors.
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  44|  * I've kept it this way to avoid deviating too much from the original
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  45|  * implementation.
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  46|  */
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  47|
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  48| import scala.collection.mutable.ArrayBuffer
ee91287 deltablue/src/main/scala/org/scalajs/benchmark/deltablue/DeltaBlue.scala Jonas Fonseca 2014-03-01 17:26 -0500  49| import scala.scalajs.js.annotation.JSExport
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  50|
ee91287 deltablue/src/main/scala/org/scalajs/benchmark/deltablue/DeltaBlue.scala Jonas Fonseca 2014-03-01 17:26 -0500  51| @JSExport
296fc90 deltablue/src/main/scala/org/scalajs/benchmark/deltablue/DeltaBlue.scala Jonas Fonseca 2014-01-16 22:51 -0500  52| object DeltaBlue extends org.scalajs.benchmark.Benchmark {
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  53|
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  54|   override def prefix = "DeltaBlue"
b103989 deltablue/DeltaBlue.scala                                                Jonas Fonseca 2013-10-20 00:23 -0700  55|
[blame] b103989d59edab3adc312ff5408fa3d344ea0201 changed deltablue/DeltaBlue.scala - line 42 of 711                                                                                                   7%
EOF
