mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-11 20:02:09 +00:00
cleaned up texttest_rig.py
This commit is contained in:
parent
4f621844ba
commit
c3692a1e82
@ -1,8 +1,8 @@
|
|||||||
package com.gildedrose
|
package com.gildedrose
|
||||||
|
|
||||||
object TexttestFixture {
|
object TexttestFixture {
|
||||||
@main
|
|
||||||
def main(args: String*): Unit = {
|
def main(args: Array[String]): Unit = {
|
||||||
println("OMGHAI!")
|
println("OMGHAI!")
|
||||||
|
|
||||||
val items = Array[Item](
|
val items = Array[Item](
|
||||||
|
|||||||
14
scala/texttest_rig.py
Normal file
14
scala/texttest_rig.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
"""
|
||||||
|
This script uses Gradle to execute the TexttestFixture.
|
||||||
|
It is designed to be used by TextTest and specified in the file 'texttests/config.gr' in this repo.
|
||||||
|
It is more convenient for TextTest to use since Gradle needs
|
||||||
|
several arguments in addition to the one the TextTest fixture needs.
|
||||||
|
"""
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
args = " ".join(sys.argv[1:])
|
||||||
|
TEXTTEST_HOME = os.environ.get("TEXTTEST_HOME", os.getcwd())
|
||||||
|
subprocess.run(f"""(cd {TEXTTEST_HOME}/scala/; sbt run "Test / runMain com.gildedrose.TexttestFixture {args}") """, shell=True)
|
||||||
@ -1,3 +1,40 @@
|
|||||||
|
[info] welcome to sbt 1.11.6 (Azul Systems, Inc. Java 21.0.8)
|
||||||
|
[info] loading global plugins from /Users/rco/.sbt/1.0/plugins
|
||||||
|
[info] loading settings for project scala-build-build from metals.sbt...
|
||||||
|
[info] loading project definition from /Users/rco/Developer/katas/GildedRose-Refactoring-Kata/scala/project/project
|
||||||
|
[info] loading project definition from /Users/rco/Developer/katas/GildedRose-Refactoring-Kata/scala/project
|
||||||
|
[success] Generated .bloop/scala-build.json
|
||||||
|
[success] Total time: 1 s, completed 26.09.2025, 20:01:30
|
||||||
|
[info] loading settings for project root from build.sbt...
|
||||||
|
[info] set current project to GildedRose (in build file:/Users/rco/Developer/katas/GildedRose-Refactoring-Kata/scala/)
|
||||||
|
[info] running com.gildedrose.Main
|
||||||
|
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
|
||||||
|
|
||||||
|
[success] Total time: 0 s, completed 26.09.2025, 20:01:31
|
||||||
|
[info] running com.gildedrose.TexttestFixture 30
|
||||||
OMGHAI!
|
OMGHAI!
|
||||||
-------- day 0 --------
|
-------- day 0 --------
|
||||||
name, sellIn, quality
|
name, sellIn, quality
|
||||||
@ -371,3 +408,4 @@ Backstage passes to a TAFKAL80ETC concert, -20, 0
|
|||||||
Backstage passes to a TAFKAL80ETC concert, -25, 0
|
Backstage passes to a TAFKAL80ETC concert, -25, 0
|
||||||
Conjured Mana Cake, -27, 0
|
Conjured Mana Cake, -27, 0
|
||||||
|
|
||||||
|
[success] Total time: 0 s, completed 26.09.2025, 20:01:31
|
||||||
|
|||||||
@ -2,7 +2,7 @@ full_name:Gilded Rose Refactoring Kata
|
|||||||
|
|
||||||
# set your preferred editor and diff tool.
|
# set your preferred editor and diff tool.
|
||||||
view_program:subl
|
view_program:subl
|
||||||
diff_program:meld
|
diff_program:kdiff3
|
||||||
|
|
||||||
# Settings for the Python version
|
# Settings for the Python version
|
||||||
#executable:${TEXTTEST_HOME}/python/texttest_fixture.py
|
#executable:${TEXTTEST_HOME}/python/texttest_fixture.py
|
||||||
@ -34,8 +34,8 @@ diff_program:meld
|
|||||||
#interpreter:python
|
#interpreter:python
|
||||||
|
|
||||||
# Settings for the Ruby version
|
# Settings for the Ruby version
|
||||||
executable:${TEXTTEST_HOME}/ruby/texttest_fixture.rb
|
#executable:${TEXTTEST_HOME}/ruby/texttest_fixture.rb
|
||||||
interpreter:ruby
|
#interpreter:ruby
|
||||||
|
|
||||||
# Settings for the C# Core version
|
# Settings for the C# Core version
|
||||||
#executable:${TEXTTEST_HOME}/csharpcore/GildedRoseTests/bin/Debug/net8.0/GildedRoseTests
|
#executable:${TEXTTEST_HOME}/csharpcore/GildedRoseTests/bin/Debug/net8.0/GildedRoseTests
|
||||||
@ -70,4 +70,20 @@ interpreter:ruby
|
|||||||
# Settings for the Odin version
|
# Settings for the Odin version
|
||||||
#executable:${TEXTTEST_HOME}/odin/gilded_rose<include your OS executable extension here>
|
#executable:${TEXTTEST_HOME}/odin/gilded_rose<include your OS executable extension here>
|
||||||
|
|
||||||
|
# Settings for the scala version using the classpath
|
||||||
|
# executable:com.gildedrose.TexttestFixture
|
||||||
|
#executable:com.gildedrose.TexttestFixture.scala
|
||||||
|
#interpreter:"scala run"
|
||||||
|
# note you'll also need to update the file environment.gr with your classpath if you keep your classfiles somewhere unusual
|
||||||
|
|
||||||
|
# Settings for the scala version using sbt wrapped in a python script
|
||||||
|
executable:${TEXTTEST_HOME}/scala/texttest_rig.py
|
||||||
|
interpreter:python
|
||||||
|
|
||||||
|
|
||||||
filename_convention_scheme:standard
|
filename_convention_scheme:standard
|
||||||
|
|
||||||
|
[run_dependent_text]
|
||||||
|
stdout:\[info\]
|
||||||
|
stdout:\[success\]
|
||||||
|
stdout:And lines like this
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user