From 29b5ab554790bb57337a3b6ab9dcd963cf69d22e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 14:47:08 +0200 Subject: Adding upstream version 1.7.2+ds. Signed-off-by: Daniel Baumann --- tests/resources/userdiff/expected/driver/diff.html | 26 +++++++++++++++++++++ .../userdiff/expected/driver/diff.javascript | 27 ++++++++++++++++++++++ tests/resources/userdiff/expected/driver/diff.php | 26 +++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 tests/resources/userdiff/expected/driver/diff.html create mode 100644 tests/resources/userdiff/expected/driver/diff.javascript create mode 100644 tests/resources/userdiff/expected/driver/diff.php (limited to 'tests/resources/userdiff/expected/driver') diff --git a/tests/resources/userdiff/expected/driver/diff.html b/tests/resources/userdiff/expected/driver/diff.html new file mode 100644 index 0000000..5a428e7 --- /dev/null +++ b/tests/resources/userdiff/expected/driver/diff.html @@ -0,0 +1,26 @@ +diff --git a/files/file.html b/files/file.html +index 872d196..2320e2f 100644 +--- a/files/file.html ++++ b/files/file.html +@@ -5,4 +5,4 @@

+
  • item 1.1
  • +-
  • item 1.2
  • +-
  • item 1.3
  • ++
  • item 1.2 changed
  • ++
  • item 1.3 changed
  • +
  • item 1.4
  • +@@ -13,2 +13,3 @@

    +
  • item 1.9
  • ++
  • item 1.10 added
  • + +@@ -23,3 +24,4 @@

    +
  • item 2.6
  • +-
  • item 2.7
  • ++
  • item 2.7 changed
  • ++
  • item 2.7.1 added
  • +
  • item 2.8
  • +@@ -35,4 +37,2 @@

    +
  • item 3.6
  • +-
  • item 3.7
  • +-
  • item 3.8
  • + diff --git a/tests/resources/userdiff/expected/driver/diff.javascript b/tests/resources/userdiff/expected/driver/diff.javascript new file mode 100644 index 0000000..4cefe5c --- /dev/null +++ b/tests/resources/userdiff/expected/driver/diff.javascript @@ -0,0 +1,27 @@ +diff --git a/files/file.javascript b/files/file.javascript +index 0965b37..5391797 100644 +--- a/files/file.javascript ++++ b/files/file.javascript +@@ -4,4 +4,3 @@ function(require, exports, module) + var Key = require("./key") +- , Direction = require("./direction") +- , Image = require("./image"); ++ , Direction = require("./direction"); + +@@ -16,4 +15,4 @@ function Player(game) + +- this.pixelX = 0; +- this.pixelY = 0; ++ this.pixelX = 10; ++ this.pixelY = 10; + +@@ -82,3 +81,3 @@ Player.prototype.moveUp = function() + Player.prototype.moveLeft = function() { +- this.x -= 1; ++ this.x -= 5; + this.direction = Direction.LEFT; +@@ -106,3 +105,3 @@ Player.prototype.draw = function(context) + +- context.drawImage(this.image.data, offsetX, offsetY, 32, 48, this.pixelX, this.pixelY - 16, 32, 48); ++ context.drawImage(this.image.data, offsetX, offsetY, 32, 48, this.pixelX, this.pixelY, 32, 48); + }; diff --git a/tests/resources/userdiff/expected/driver/diff.php b/tests/resources/userdiff/expected/driver/diff.php new file mode 100644 index 0000000..9711b5b --- /dev/null +++ b/tests/resources/userdiff/expected/driver/diff.php @@ -0,0 +1,26 @@ +diff --git a/files/file.php b/files/file.php +index 63250ad..967d646 100644 +--- a/files/file.php ++++ b/files/file.php +@@ -12,2 +12,3 @@ class UniqueGenerator + protected $maxRetries; ++ protected $moreStuff; + protected $uniques = array(); +@@ -17,3 +18,3 @@ public function __construct(Generator $generator, $maxRetries) + $this->generator = $generator; +- $this->maxRetries = $maxRetries; ++ $this->maxRetries = $maxRetries + 1; + } +@@ -33,10 +34,10 @@ public function __call($name, $arguments) + { ++ $i = 0; + if (!isset($this->uniques[$name])) { + $this->uniques[$name] = array(); + } +- $i = 0; + do { + $res = call_user_func_array(array($this->generator, $name), $arguments); + $i++; +- if ($i > $this->maxRetries) { ++ if ($i >= $this->maxRetries) { + throw new \OverflowException(sprintf('Maximum retries of %d reached without finding a unique value', $this->maxRetries)); -- cgit v1.2.3