mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 12:22:12 +00:00
jq ci: compare to 30 days texttest stdout
This commit is contained in:
parent
e7545c322e
commit
8ee93709a5
4
.github/workflows/jq.yml
vendored
4
.github/workflows/jq.yml
vendored
@ -35,5 +35,5 @@ jobs:
|
|||||||
- name: Expect texttest fixture output (aka 'verify')
|
- name: Expect texttest fixture output (aka 'verify')
|
||||||
working-directory: jq
|
working-directory: jq
|
||||||
run: |
|
run: |
|
||||||
jaq --arg days 10 -nr "$(cat gilded-rose.jq) $(cat texttest_fixture.jq)" |
|
jaq --arg days 31 -nr "$(cat gilded-rose.jq) $(cat texttest_fixture.jq)" |
|
||||||
diff - texttest-10-day-result
|
diff - ../texttests/ThirtyDays/stdout.gr
|
||||||
|
|||||||
@ -1,121 +0,0 @@
|
|||||||
OMGHAI!
|
|
||||||
|
|
||||||
-------- day 0 --------
|
|
||||||
name, sellIn, quality
|
|
||||||
+5 Dexterity Vest, 10, 20
|
|
||||||
Aged Brie, 2, 0
|
|
||||||
Elixir of the Mongoose, 5, 7
|
|
||||||
Sulfuras, Hand of Ragnaros, 0, 80
|
|
||||||
Sulfuras, Hand of Ragnaros, 1, 80
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 15, 20
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 10, 49
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 5, 49
|
|
||||||
Conjured Mana Cake, 3, 6
|
|
||||||
|
|
||||||
-------- day 1 --------
|
|
||||||
name, sellIn, quality
|
|
||||||
+5 Dexterity Vest, 9, 19
|
|
||||||
Aged Brie, 1, 1
|
|
||||||
Elixir of the Mongoose, 4, 6
|
|
||||||
Sulfuras, Hand of Ragnaros, 0, 80
|
|
||||||
Sulfuras, Hand of Ragnaros, 1, 80
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 14, 21
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 9, 50
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 4, 50
|
|
||||||
Conjured Mana Cake, 2, 5
|
|
||||||
|
|
||||||
-------- day 2 --------
|
|
||||||
name, sellIn, quality
|
|
||||||
+5 Dexterity Vest, 8, 18
|
|
||||||
Aged Brie, 0, 2
|
|
||||||
Elixir of the Mongoose, 3, 5
|
|
||||||
Sulfuras, Hand of Ragnaros, 0, 80
|
|
||||||
Sulfuras, Hand of Ragnaros, 1, 80
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 13, 22
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 8, 50
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 3, 50
|
|
||||||
Conjured Mana Cake, 1, 4
|
|
||||||
|
|
||||||
-------- day 3 --------
|
|
||||||
name, sellIn, quality
|
|
||||||
+5 Dexterity Vest, 7, 17
|
|
||||||
Aged Brie, -1, 4
|
|
||||||
Elixir of the Mongoose, 2, 4
|
|
||||||
Sulfuras, Hand of Ragnaros, 0, 80
|
|
||||||
Sulfuras, Hand of Ragnaros, 1, 80
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 12, 23
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 7, 50
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 2, 50
|
|
||||||
Conjured Mana Cake, 0, 3
|
|
||||||
|
|
||||||
-------- day 4 --------
|
|
||||||
name, sellIn, quality
|
|
||||||
+5 Dexterity Vest, 6, 16
|
|
||||||
Aged Brie, -2, 6
|
|
||||||
Elixir of the Mongoose, 1, 3
|
|
||||||
Sulfuras, Hand of Ragnaros, 0, 80
|
|
||||||
Sulfuras, Hand of Ragnaros, 1, 80
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 11, 24
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 6, 50
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 1, 50
|
|
||||||
Conjured Mana Cake, -1, 1
|
|
||||||
|
|
||||||
-------- day 5 --------
|
|
||||||
name, sellIn, quality
|
|
||||||
+5 Dexterity Vest, 5, 15
|
|
||||||
Aged Brie, -3, 8
|
|
||||||
Elixir of the Mongoose, 0, 2
|
|
||||||
Sulfuras, Hand of Ragnaros, 0, 80
|
|
||||||
Sulfuras, Hand of Ragnaros, 1, 80
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 10, 25
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 5, 50
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 0, 50
|
|
||||||
Conjured Mana Cake, -2, 0
|
|
||||||
|
|
||||||
-------- day 6 --------
|
|
||||||
name, sellIn, quality
|
|
||||||
+5 Dexterity Vest, 4, 14
|
|
||||||
Aged Brie, -4, 10
|
|
||||||
Elixir of the Mongoose, -1, 0
|
|
||||||
Sulfuras, Hand of Ragnaros, 0, 80
|
|
||||||
Sulfuras, Hand of Ragnaros, 1, 80
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 9, 27
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 4, 50
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, -1, 0
|
|
||||||
Conjured Mana Cake, -3, 0
|
|
||||||
|
|
||||||
-------- day 7 --------
|
|
||||||
name, sellIn, quality
|
|
||||||
+5 Dexterity Vest, 3, 13
|
|
||||||
Aged Brie, -5, 12
|
|
||||||
Elixir of the Mongoose, -2, 0
|
|
||||||
Sulfuras, Hand of Ragnaros, 0, 80
|
|
||||||
Sulfuras, Hand of Ragnaros, 1, 80
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 8, 29
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 3, 50
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, -2, 0
|
|
||||||
Conjured Mana Cake, -4, 0
|
|
||||||
|
|
||||||
-------- day 8 --------
|
|
||||||
name, sellIn, quality
|
|
||||||
+5 Dexterity Vest, 2, 12
|
|
||||||
Aged Brie, -6, 14
|
|
||||||
Elixir of the Mongoose, -3, 0
|
|
||||||
Sulfuras, Hand of Ragnaros, 0, 80
|
|
||||||
Sulfuras, Hand of Ragnaros, 1, 80
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 7, 31
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 2, 50
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, -3, 0
|
|
||||||
Conjured Mana Cake, -5, 0
|
|
||||||
|
|
||||||
-------- day 9 --------
|
|
||||||
name, sellIn, quality
|
|
||||||
+5 Dexterity Vest, 1, 11
|
|
||||||
Aged Brie, -7, 16
|
|
||||||
Elixir of the Mongoose, -4, 0
|
|
||||||
Sulfuras, Hand of Ragnaros, 0, 80
|
|
||||||
Sulfuras, Hand of Ragnaros, 1, 80
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 6, 33
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, 1, 50
|
|
||||||
Backstage passes to a TAFKAL80ETC concert, -4, 0
|
|
||||||
Conjured Mana Cake, -6, 0
|
|
||||||
@ -5,7 +5,7 @@
|
|||||||
{ name: "Aged Brie", sell_in: 2, quality: 0 },
|
{ name: "Aged Brie", sell_in: 2, quality: 0 },
|
||||||
{ name: "Elixir of the Mongoose", sell_in: 5, quality: 7 },
|
{ name: "Elixir of the Mongoose", sell_in: 5, quality: 7 },
|
||||||
{ name: "Sulfuras, Hand of Ragnaros", sell_in: 0, quality: 80 },
|
{ name: "Sulfuras, Hand of Ragnaros", sell_in: 0, quality: 80 },
|
||||||
{ name: "Sulfuras, Hand of Ragnaros", sell_in: 1, quality: 80 },
|
{ name: "Sulfuras, Hand of Ragnaros", sell_in: -1, quality: 80 },
|
||||||
{ name: "Backstage passes to a TAFKAL80ETC concert", sell_in: 15, quality: 20 },
|
{ name: "Backstage passes to a TAFKAL80ETC concert", sell_in: 15, quality: 20 },
|
||||||
{ name: "Backstage passes to a TAFKAL80ETC concert", sell_in: 10, quality: 49 },
|
{ name: "Backstage passes to a TAFKAL80ETC concert", sell_in: 10, quality: 49 },
|
||||||
{ name: "Backstage passes to a TAFKAL80ETC concert", sell_in: 5, quality: 49 },
|
{ name: "Backstage passes to a TAFKAL80ETC concert", sell_in: 5, quality: 49 },
|
||||||
@ -14,9 +14,9 @@
|
|||||||
{ items: ., day: 0 } |
|
{ items: ., day: 0 } |
|
||||||
recurse(.day += 1 | .items = (.items | update_quality); .day < ($ARGS.named.days // 2 | tonumber)) |
|
recurse(.day += 1 | .items = (.items | update_quality); .day < ($ARGS.named.days // 2 | tonumber)) |
|
||||||
(
|
(
|
||||||
"",
|
|
||||||
(["-------- day ", (.day | tostring), " --------"] | add),
|
(["-------- day ", (.day | tostring), " --------"] | add),
|
||||||
("name, sellIn, quality"),
|
("name, sellIn, quality"),
|
||||||
(.items[] | [.name, .sell_in, .quality | tostring] | join(", "))
|
(.items[] | [.name, .sell_in, .quality | tostring] | join(", ")),
|
||||||
|
""
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user