diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:47:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:47:08 +0000 |
commit | 29b5ab554790bb57337a3b6ab9dcd963cf69d22e (patch) | |
tree | be1456d2bc6c1fb078695fad7bc8f6b212062d3c /tests/resources/userdiff/expected/driver | |
parent | Initial commit. (diff) | |
download | libgit2-29b5ab554790bb57337a3b6ab9dcd963cf69d22e.tar.xz libgit2-29b5ab554790bb57337a3b6ab9dcd963cf69d22e.zip |
Adding upstream version 1.7.2+ds.upstream/1.7.2+ds
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/resources/userdiff/expected/driver')
-rw-r--r-- | tests/resources/userdiff/expected/driver/diff.html | 26 | ||||
-rw-r--r-- | tests/resources/userdiff/expected/driver/diff.javascript | 27 | ||||
-rw-r--r-- | tests/resources/userdiff/expected/driver/diff.php | 26 |
3 files changed, 79 insertions, 0 deletions
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 @@ <h1 id="first section"> + <li>item 1.1</li> +- <li>item 1.2</li> +- <li>item 1.3</li> ++ <li>item 1.2 changed</li> ++ <li>item 1.3 changed</li> + <li>item 1.4</li> +@@ -13,2 +13,3 @@ <h1 id="first section"> + <li>item 1.9</li> ++ <li>item 1.10 added</li> + </ol> +@@ -23,3 +24,4 @@ <h1 id="second section"> + <li>item 2.6</li> +- <li>item 2.7</li> ++ <li>item 2.7 changed</li> ++ <li>item 2.7.1 added</li> + <li>item 2.8</li> +@@ -35,4 +37,2 @@ <h1 id="third section"> + <li>item 3.6</li> +- <li>item 3.7</li> +- <li>item 3.8</li> + </ol> 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)); |