### Install Quicklisp Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/common-lisp-parachute/README.md Instructions for installing Quicklisp, a Common Lisp implementation dependency manager. Load the provided lisp file and run the install command. ```lisp (quicklisp-quickstart:install) ``` ```lisp (ql:add-to-init-file) ``` -------------------------------- ### Install Dependencies Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/TypeScript/README.md Installs the necessary project dependencies using npm. ```sh npm install ``` -------------------------------- ### Install Project Dependencies with Opam Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/ocaml/README.md Execute this command in the root of the ocaml directory to create a new opam switch and install project dependencies. ```sh opam switch create . --deps-only eval $(opam env) ``` -------------------------------- ### Install Dependencies with Yarn Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/rescript/README.md Run this command to install project dependencies. ```sh yarn install ``` -------------------------------- ### Start Development Server with Yarn Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/rescript/README.md Initiate the development server for Rescript projects. ```sh yarn dev:rescript ``` -------------------------------- ### Compile the Project with sbt Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/scala/README.md Use this command to compile the Scala project. Ensure sbt is installed and the project is set up correctly. ```cmd sbt compile ``` -------------------------------- ### Install Composer Dependencies Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/php/README.md Navigate to the PHP project directory and install all project dependencies using Composer. This command ensures all required packages are downloaded and configured. ```shell script cd ./GildedRose-Refactoring-Kata/php composer install ``` -------------------------------- ### Install Test Dependencies Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/janet/README.md Install the necessary test library dependencies for the project using jpm. This command should be run before executing tests. ```sh jpm -l deps ``` -------------------------------- ### Build Zig Executable Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/zig/README.md Compile the Zig project to create an executable file. This command builds the project and installs the executable. ```sh $ zig build ``` -------------------------------- ### Install Dependencies with LuaRocks Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/lua/README.md Installs project dependencies using LuaRocks. Ensure you have LuaRocks installed and are in the project root. ```sh $ luarocks install --only-deps gildedrose-dev-1.rockspec ``` -------------------------------- ### CMake Minimum Version and Project Setup Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/c_cmocka/CMakeLists.txt Sets the minimum required CMake version and defines the project name and version. ```cmake cmake_minimum_required(VERSION 3.14 FATAL_ERROR) project(GildedRose VERSION 1.0) ``` -------------------------------- ### Run Unit Tests in Gleam Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/gleam/README.md Execute the project's unit tests from the command line using the `gleam test` command. Ensure Gleam is installed. ```sh gleam test ``` -------------------------------- ### Run All Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/janet/README.md Execute all the tests for the project using the jpm test command. This assumes dependencies have already been installed. ```sh jpm -l test ``` -------------------------------- ### Install RSpec Gem Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/ruby/README.md Install the RSpec testing framework using the RubyGems package manager. ```bash gem install rspec ``` -------------------------------- ### Gilded Rose Feature File Example Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/Java-Cucumber/README.md Define test scenarios in Gherkin syntax within a .feature file. This example shows a basic scenario for updating aged brie. ```gherkin Feature: Gilded Rose Scenario: Buy aged brie Given the aged brie is 20 days old When the item is updated Then the aged brie should be 21 days old ``` -------------------------------- ### Run TextTest Fixture Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/TypeScript/README.md Executes the TextTest fixture using ts-node. Ensure ts-node is installed. ```sh npx ts-node test/golden-master-text-test.ts ``` -------------------------------- ### Mocking with cl-mock-library Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/common-lisp-parachute/README.md Example of using the cl-mock-library for mocking functions and methods within tests. It shows how to define mock behavior and assert method invocations. ```lisp (with-mocks () (answer (call-previous)) ( ) (is (invocations '))) ``` -------------------------------- ### Gilded Rose Step Definitions Example Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/Java-Cucumber/README.md Implement step definitions in Java to connect Gherkin steps to executable code. This example provides a basic structure for handling item updates. ```java package com.gildedrose; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; import static org.junit.jupiter.api.Assertions.assertEquals; public class StepDefinitions { private Item item; @Given("the aged brie is {int} days old") public void the_aged_brie_is_days_old(int days) { item = new Item("Aged Brie", days, 0); } @When("the item is updated") public void the_item_is_updated() { GildedRose.updateQuality(new Item[]{item}); } @Then("the aged brie should be {int} days old") public void the_aged_brie_should_be_days_old(int days) { assertEquals(days, item.days); } } ``` -------------------------------- ### Specify Number of Days for TextTest Fixture Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/io/README.md Run the TextTestFixture and specify the number of days to simulate, for example, 10 days. ```shell io ./tests/correctness/TexttestFixture.io 10 ``` -------------------------------- ### Compile Project with rebar3 Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/erlang/README.md Use this command to compile the Erlang project. Ensure rebar3 is installed and accessible in your PATH. ```bash rebar3 compile ``` -------------------------------- ### Run Tests with rebar3 Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/lfe/README.md Execute the tests for the LFE Gilded Rose Kata using the rebar3 build tool. Ensure Erlang and rebar3 are installed. ```bash rebar3 as test lfe ltest ``` -------------------------------- ### CMake Test Build Options Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/cpp/README.md Example of disabling specific test frameworks during CMake configuration. ```bash cmake -DBUILD_APPROVAL_TESTS_WITH_CATCH2=OFF -DBUILD_UNIT_TESTS_WITH_CATCH2=OFF .. ``` -------------------------------- ### Run Unit Tests with Coverage Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/lua/README.md Runs unit tests and generates a code coverage report. Requires LuaCov to be installed. ```sh $ busted --coverage ``` ```sh $ luacov # generate the report ``` -------------------------------- ### Clone Repository using SSH Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/php/README.md Clone the GildedRose-Refactoring-Kata repository using SSH. This is a standard way to get a local copy of the project. ```sh git clone git@github.com:emilybache/GildedRose-Refactoring-Kata.git ``` -------------------------------- ### Configure Google Test Build Options Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/cpp/test/CMakeLists.txt Sets specific build options for Google Test when it's being used. This includes forcing shared runtime libraries and disabling GMock and installation. ```cmake if (BUILD_APPROVAL_TESTS_WITH_GTEST OR BUILD_UNIT_TESTS_WITH_GTEST) # Force Google Test to link the C/C++ runtimes dynamically set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) # Disable building GMock set(BUILD_GMOCK OFF CACHE BOOL "" FORCE) # Do not install GTest set(INSTALL_GTEST OFF CACHE BOOL "" FORCE) endif() ``` -------------------------------- ### Add Item using CALL statement Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/plpgsql/README.md Example of how to add a new item to the 'item' table using the 'new_item' stored procedure via a SQL CALL statement. ```sql CALL new_item('+5 Dexterity Vest', 10, 20); ``` -------------------------------- ### Build Tests with CMake Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/fortran/README.md Navigate to the Fortran directory, create a build folder, and configure the project with CMake. Then, build the project. ```bash cd ${GIT_FOLDER}/GildedRose-Refactoring-Kata/fortran mkdir build cd build cmake .. cmake --build . ``` -------------------------------- ### Run Unit Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/odin/README.md Execute unit tests for the project from the command line. Ensure you are in the project's root directory. ```bash $ odin test tests ``` -------------------------------- ### Build Tests with CMake Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/cpp/README.md Commands to navigate to the C++ directory, create a build folder, and configure the project using CMake. ```bash cd ${GIT_FOLDER}/GildedRose-Refactoring-Kata/cpp mkdir build cd build cmake .. ``` -------------------------------- ### Load Project with Quicklisp Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/common-lisp-parachute/README.md Load the gilded-rose project into your Common Lisp environment after placing it in the local-projects directory. ```lisp (ql:quickload "gilded-rose") ``` -------------------------------- ### Run Swift Tests from Command Line Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/swift/README.md Execute all tests for the Swift project using the `swift test` command. ```bash swift test ``` -------------------------------- ### Run TextTest Fixture from Command-Line Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/io/README.md Execute the TextTestFixture using the 'io' command followed by the fixture file path. ```shell io ./tests/correctness/TexttestFixture.io ``` -------------------------------- ### Build and Run the Gilded Rose Project with Dune Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/ocaml/README.md Use this command to build the project with dune and execute the gilded_rose binary. ```sh dune exec gilded_rose ``` -------------------------------- ### Run Unit Tests from Command-Line Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/io/README.md Execute the unit tests using the 'io' command followed by the test file path. ```shell io ./tests/correctness/run.io ``` -------------------------------- ### Run Unit Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/TypeScript-deno/README.md Execute all unit tests for the project from the command line. ```sh deno test ``` -------------------------------- ### Run Text Fixture Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/go/README.md Execute the text fixture for the Go application. An optional number of days can be provided as an argument; otherwise, it defaults to 2. ```shell go run texttest_fixture.go [; default: 2] ``` -------------------------------- ### Run Gilded Rose Text Fixture Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/Kotlin/README.md Execute the default text fixture for the Gilded Rose kata using Gradle. ```bash ./gradlew -q text ``` -------------------------------- ### Run Text Fixture Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/php/README.md Execute the text test fixture from the PHP directory. Change the number '10' to specify the number of days for the simulation. ```shell php .\fixtures\texttest_fixture.php 10 ``` -------------------------------- ### Build Gilded Rose Project Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/csharp.xUnit/README.md Build the project in Debug mode using the dotnet CLI. ```cmd dotnet build GildedRose.sln -c Debug ``` -------------------------------- ### Run TextTest Fixture Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/lua/README.md Executes the TextTest fixture from the command line, specifying the number of days to simulate. ```sh $ lua src/main.lua 10 ``` -------------------------------- ### Run TextTest Fixture Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/TypeScript-deno/README.md Execute the TextTest fixture to verify the project's behavior. ```sh deno run test/golden-master-text-test.ts ``` -------------------------------- ### Run Judge Executable Directly Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/janet/README.md Execute the installed judge testing utility directly from its location within the jpm_tree. This is an alternative to running tests via 'jpm -l test'. ```sh ./jpm_tree/bin/judge ``` -------------------------------- ### Run Tests with rebar3 Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/erlang/README.md Execute the unit tests for the project using the rebar3 eunit command. This verifies the correctness of your code. ```bash rebar3 eunit ``` -------------------------------- ### Run Unit Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/bash/README.md Execute the unit test script. This is typically the first step in verifying code changes. ```bash ./unit_test.sh ``` -------------------------------- ### Configure CMocka Build Options Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/c_cmocka/test-cmocka/CMakeLists.txt Sets CMake cache variables to control how CMocka is built, such as disabling static library, cmockery support, examples, unit testing, and picky developer flags. ```cmake set(WITH_STATIC_LIB ON CACHE BOOL "CMocka: Build with a static library" FORCE) set(WITH_CMOCKERY_SUPPORT OFF CACHE BOOL "CMocka: Install a cmockery header" FORCE) set(WITH_EXAMPLES OFF CACHE BOOL "CMocka: Build examples" FORCE) set(UNIT_TESTING OFF CACHE BOOL "CMocka: Build with unit testing" FORCE) set(PICKY_DEVELOPER OFF CACHE BOOL "CMocka: Build with picky developer flags" FORCE) ``` -------------------------------- ### Show Available Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/fortran/README.md After building, navigate to the build directory and use 'ctest -N' to list all available tests. ```bash cd ${GIT_FOLDER}/GildedRose-Refactoring-Kata/fortran/build ctest -N ``` -------------------------------- ### Run Tests with Alcotest and Dune Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/ocaml/README.md Launch the test suite for the project using dune and Alcotest by running this command. ```sh dune runtest ``` -------------------------------- ### Run Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/go/README.md Execute all tests within the Go project. This command is used to verify the correctness of the codebase. ```shell go test ./... ``` -------------------------------- ### Run All Unit Tests with sbt Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/scala/README.md This command runs all the unit tests defined in the project, including approval tests. It's the standard way to verify the project's functionality. ```cmd sbt test ``` -------------------------------- ### Define Library and Sources Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/c_cmocka/src/CMakeLists.txt Sets the library name and lists the source files. This is a standard CMake configuration step. ```cmake set(SRC_LIB_NAME src) set(SOURCES GildedRose.c) add_library(${SRC_LIB_NAME} ${SOURCES}) ``` -------------------------------- ### Run Tests and Generate Coverage Report Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/go/README.md Run all tests and generate a coverage profile. The coverage profile can then be used to generate an HTML report for detailed analysis. ```shell go test ./... -coverprofile=coverage.out go tool cover -html=coverage.out ``` -------------------------------- ### Configure TextTest to use Gradle Wrapper Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/Java/README.md Uncomment these lines in config.gr to use the Gradle wrapper via a Python script for TextTest execution. ```properties executable:${TEXTTEST_HOME}/Java/texttest_rig.py interpreter:python ``` -------------------------------- ### Run Unit Tests in Zig Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/zig/README.md Execute all unit tests for the Zig project from the command line using the Zig build system. ```sh $ zig build test ``` -------------------------------- ### Run ApprovalTests.Python Test Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/python/README.md Execute the tests using the ApprovalTests.Python framework. You will need to approve the output file by renaming it. ```bash python tests/test_gilded_rose_approvals.py ``` -------------------------------- ### Create Executable and Link Libraries Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/c_cmocka/CMakeLists.txt Builds the main executable for the Gilded Rose text tests and links it with the source library. ```cmake add_executable(main GildedRoseTextTests.c) target_link_libraries(main src) ``` -------------------------------- ### Run TextTest Fixture with jq Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/jq/README.md Combine jq scripts to run the text test fixture. ```shell jq -nr "$(cat gilded-rose.jq) $(cat texttest_fixture.jq)" ``` -------------------------------- ### Run Gilded Rose with Specific Days Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/Kotlin/README.md Run the Gilded Rose kata simulation for a specified number of days using Gradle. ```bash ./gradlew run --args 10 ``` -------------------------------- ### Configure TextTest to use Direct Java Execution Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/Java/README.md Uncomment these lines in config.gr to use direct Java execution for TextTest, assuming CLASSPATH is set correctly. ```properties executable:com.gildedrose.TexttestFixture interpreter:java ``` -------------------------------- ### Build TextTest Fixture Executable Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/odin/README.md Compile the Gilded Rose application into an executable file. Replace the placeholder with your operating system's executable extension (e.g., .exe for Windows, .bin for macOS/Linux). ```bash $ odin build src -out:gilded_rose ``` -------------------------------- ### Configure TextTest for Zig Executable Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/zig/README.md This is a configuration line for TextTest, specifying the path to the Zig executable. Uncomment this line in the TextTest config file to use it. ```properties #executable:${TEXTTEST_HOME}/zig/zig-out/bin/zig ``` -------------------------------- ### Execute TextTest Fixture on Windows Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/odin/README.md Run the built Gilded Rose executable on Windows with a specified number of days for testing. Ensure the executable is in the current directory. ```bash $ ./gilded_rose.exe 10 ``` -------------------------------- ### Build All Tests with CMake Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/cpp/README.md Command to build all tests using CMake. ```bash cmake --build . ``` -------------------------------- ### Configure GoogleTest Approval Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/cpp/test/cpp_googletest_approvaltest/CMakeLists.txt This snippet defines the build process for GoogleTest approval tests. It sets up the executable, links necessary libraries (GildedRoseLib and gtest), and adds the test to be run by CTest. ```cmake if (BUILD_APPROVAL_TESTS_WITH_GTEST) set(TEST_NAME GildedRoseGoogletestApprovalTests) add_executable(${TEST_NAME}) target_sources(${TEST_NAME} PRIVATE GildedRoseGoogletestApprovalTests.cc) target_include_directories(${TEST_NAME} PUBLIC ../third_party) target_link_libraries(${TEST_NAME} GildedRoseLib gtest) set_property(TARGET ${TEST_NAME} PROPERTY CXX_STANDARD 11) add_test( NAME ${TEST_NAME} COMMAND ${TEST_NAME} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) # Set compiler option /FC for Visual Studio to to make the __FILE__ macro expand to full path. # The __FILE__ macro can be used to get the path to current test file. # Links: # * https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019 # * https://docs.microsoft.com/en-us/cpp/build/reference/fc-full-path-of-source-code-file-in-diagnostics?view=vs-2019 if (MSVC) target_compile_options(${TEST_NAME} PRIVATE "/FC") endif() endif() ``` -------------------------------- ### Run Tests and Generate Coverage Report Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/php/README.md Execute all tests and generate an HTML coverage report. The report will be located in the /builds directory and can be viewed by opening index.html. ```shell script composer test-coverage ``` -------------------------------- ### Verify Output Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/bash/README.md Run the verification script to compare generated output against a known standard. ```bash ./verify.sh ``` -------------------------------- ### Run TextTest Fixture for 10 Days Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/Java/README.md Execute the TextTest fixture for a specific number of days (e.g., 10) using Gradle. ```bash ./gradlew -q text --args 10 ``` -------------------------------- ### Run All Tests with pgUnit Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/plpgsql/README.md Shell command to execute both the 'update_quality.sql' script and the pgUnit test suite by piping them to psql. This is an alternative method for running tests. ```bash cat src/update_quality.sql pgunit/run_tests.sql | psql -d kata -f - ``` -------------------------------- ### Run Unit Tests with Busted Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/lua/README.md Executes the unit tests for the project using the Busted testing framework. Run this command from the project root. ```sh $ busted ``` -------------------------------- ### Run All Unit Tests with npm Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/js-jest/README.md Executes all unit tests defined in the project using the npm test script. ```sh npm test ``` -------------------------------- ### Run TextTest Fixture in Zig Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/zig/README.md Execute the compiled Zig program with a specified number of days as a command-line argument. This is used for the TextTest fixture. ```sh $ ./zig/zig-out/bin/zig 10 ``` -------------------------------- ### Run Static Analysis (Windows Batch) Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/php/README.md Run static analysis using the Windows batch file 'ps.bat', which is an alias for 'composer phpstan'. ```shell script ps.bat ``` -------------------------------- ### Run TextTest Fixture for Specific Days Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/jq/README.md Specify the number of days to simulate using the --arg option with jq. ```shell jq --arg days 10 -nr "$(cat gilded-rose.jq) $(cat texttest_fixture.jq)" ``` -------------------------------- ### Run TextTest Fixture Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/ruby/README.md Execute the TextTest fixture for the Gilded Rose kata, simulating item updates over a specified number of days. ```bash ruby texttest_fixture.rb 10 ``` -------------------------------- ### Run Gilded Rose Program with sbt Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/scala/README.md Execute the Gilded Rose command-line program for a specified number of days. Replace '10' with the desired number of days. ```cmd sbt "run 10" ``` -------------------------------- ### Running Cucumber Tests with Gradle Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/Java-Cucumber/README.md Execute the Cucumber tests from the project's root directory using the provided Gradle wrapper command. ```bash ./gradlew cucumber ``` -------------------------------- ### Configure TextTest for Ruby Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/ruby/README.md Specify the Ruby executable and the TextTest fixture script path in the TextTest configuration file. ```properties executable:${TEXTTEST_HOME}/ruby/texttest_fixture.rb interpreter:ruby ``` -------------------------------- ### Run TextTest Fixture with Days Argument Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/TypeScript-deno/README.md Execute the TextTest fixture and specify the number of days to simulate. ```sh deno run test/golden-master-text-test.ts 10 ``` -------------------------------- ### Run Gilded Rose Application Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/clojure/README.md Execute the main Clojure application. This command produces output suitable for texttests. ```sh clojure -M:main ``` -------------------------------- ### Run Texttest Fixture Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/bash/README.md Execute the texttest fixture script to generate output for a specific number of days. ```bash ./texttest_fixture.sh ``` ```bash ./texttest_fixture.sh 30 ``` -------------------------------- ### Run Texttest Fixture Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/common-lisp-parachute/README.md Execute the texttest-fixture for the gilded-rose project to simulate item degradation over a specified number of days. ```lisp (gilded-rose::run-gilded-rose ) ``` -------------------------------- ### Run Text Test Fixture with gsi Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/scheme/README.md Execute the text test fixture for the Gilded-Rose-Kata using the Gambit Scheme Interpreter (gsi). ```shell gsi texttest-fixture.scm ``` -------------------------------- ### Run Unit Tests with gsi Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/scheme/README.md Execute the unit tests for the Gilded-Rose-Kata using the Gambit Scheme Interpreter (gsi). Assumes the use of the minimalist `assert.scm` library. ```shell gsi gilded-rose-test.scm ``` -------------------------------- ### Build Catch2 Approval Tests with CMake Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/cpp/test/cpp_catch2_approvaltest/CMakeLists.txt Configures the build for Catch2 approval tests. This snippet should be included when the BUILD_APPROVAL_TESTS_WITH_CATCH2 option is enabled. It defines the test executable, sources, include directories, and links necessary libraries. ```cmake if (BUILD_APPROVAL_TESTS_WITH_CATCH2) set(TEST_NAME GildedRoseCatch2ApprovalTests) add_executable(${TEST_NAME}) target_sources(${TEST_NAME} PRIVATE GildedRoseCatch2ApprovalTests.cc) target_include_directories(${TEST_NAME} PUBLIC ../third_party) target_link_libraries(${TEST_NAME} GildedRoseLib Catch2::Catch2 Catch2::Catch2WithMain) set_property(TARGET ${TEST_NAME} PROPERTY CXX_STANDARD 14) add_test( NAME ${TEST_NAME} COMMAND ${TEST_NAME} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) # Set compiler option /FC for Visual Studio to to make the __FILE__ macro expand to full path. # The __FILE__ macro is used by Catch2 to get the path to current test file. # Links: # * https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019 # * https://docs.microsoft.com/en-us/cpp/build/reference/fc-full-path-of-source-code-file-in-diagnostics?view=vs-2019 if (MSVC) target_compile_options(${TEST_NAME} PRIVATE "/FC") endif() endif() ``` -------------------------------- ### Run All Gilded Rose Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/clojure/README.md Execute all tests for the Gilded Rose kata using the Clojure CLI. ```sh clojure -M:test ``` -------------------------------- ### Run All Tests with Yarn Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/rescript/README.md Execute this command to run all tests in the project. ```sh yarn test ``` -------------------------------- ### Run Project Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/common-lisp-parachute/README.md Execute the system tests for the gilded-rose project using ASDF, the Common Lisp build system. ```lisp (asdf:test-system "gilded-rose") ``` -------------------------------- ### Execute SQL Script and pgTAP Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/plpgsql/README.md Shell command to execute the 'update_quality.sql' script and then run pgTAP tests. This is used to verify the functionality of the 'update_quality' procedure. ```bash psql -d kata -f src/update_quality.sql && pg_prove pgtap/test_*.sql ``` -------------------------------- ### Run Texttest Simulation with Custom Days Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/janet/README.md Run the texttest simulation, specifying the number of days to simulate as a command-line argument. This allows for testing different simulation durations. ```sh janet test/texttest.janet 30 ``` -------------------------------- ### Fetch Catch2 Dependency Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/cpp/test/CMakeLists.txt Fetches the Catch2 testing framework from GitHub if the build flags for Catch2 are enabled. Uses a specific tag for version control and shallow cloning. ```cmake if (BUILD_APPROVAL_TESTS_WITH_CATCH2 OR BUILD_UNIT_TESTS_WITH_CATCH2) FetchContent_Declare( catch2 GIT_REPOSITORY https://github.com/catchorg/Catch2.git GIT_TAG v3.8.0 GIT_SHALLOW TRUE ) FetchContent_MakeAvailable(catch2) endif() ``` -------------------------------- ### Run Gilded Rose Application with TextTest Fixture Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/gleam/README.md Execute the Gleam application with the TextTest fixture, specifying the number of days to simulate. Compare the output against the provided stdout file for validation. ```sh gleam run -- --days=30 ``` -------------------------------- ### Check Item State using SELECT Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/plpgsql/README.md SQL query to retrieve all records from the 'item' table to check the current state of items. ```sql SELECT * FROM item; ``` -------------------------------- ### Add Subdirectories Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/c_cmocka/CMakeLists.txt Includes source and test directories into the build system. ```cmake add_subdirectory(src) add_subdirectory(test-cmocka) ``` -------------------------------- ### Run Unit Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/csharp.xUnit/README.md Execute all unit tests for the Gilded Rose project using the dotnet test command. ```cmd dotnet test ``` -------------------------------- ### Configure Catch2 Unit Tests with CMake Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/cpp/test/cpp_catch2_unittest/CMakeLists.txt This snippet sets up a C++ executable for unit tests using Catch2. It defines the test executable, sources, and links necessary libraries. It also configures the test to be discoverable and runnable by CMake's testing tools. This configuration is conditional on the BUILD_UNIT_TESTS_WITH_CATCH2 flag. ```cmake if (BUILD_UNIT_TESTS_WITH_CATCH2) set(TEST_NAME GildedRoseCatch2UnitTests) add_executable(${TEST_NAME}) target_sources(${TEST_NAME} PRIVATE GildedRoseCatch2UnitTests.cc) target_link_libraries(${TEST_NAME} GildedRoseLib Catch2::Catch2 Catch2::Catch2WithMain ) set_property(TARGET ${TEST_NAME} PROPERTY CXX_STANDARD 14) add_test( NAME ${TEST_NAME} COMMAND ${TEST_NAME} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) # Set compiler option /FC for Visual Studio to to make the __FILE__ macro expand to full path. # The __FILE__ macro is used by Catch2 to get the path to current test file. # Links: # * https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019 # * https://docs.microsoft.com/en-us/cpp/build/reference/fc-full-path-of-source-code-file-in-diagnostics?view=vs-2019 if (MSVC) target_compile_options(${TEST_NAME} PRIVATE "/FC") endif() endif() ``` -------------------------------- ### Run Unit Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/php/README.md Execute all unit tests for the PHP project using the composer script. This command runs tests defined in the project. ```shell script composer tests ``` -------------------------------- ### Show Available Tests with CTest Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/cpp/README.md Command to list all available tests using CTest. ```bash cd ${GIT_FOLDER}/GildedRose-Refactoring-Kata/cpp/build ctest -N ``` -------------------------------- ### Execute TextTest Fixture on macOS Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/odin/README.md Run the built Gilded Rose executable on macOS with a specified number of days for testing. Ensure the executable is in the current directory. ```bash $ ./gilded_rose.bin 10 ``` -------------------------------- ### Run Main Application with Erlang Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/erlang/README.md This command executes the main application using the Erlang runtime. It sets the module path and passes a parameter to the main function. The '-noshell' flag prevents an interactive Erlang shell from appearing after execution. ```bash erl -pa _build/default/lib/gilded_rose/ebin -pa . -eval main:main([30]). -s init stop -noshell ``` -------------------------------- ### Run All Tests with CTest Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/cpp/README.md Command to execute all tests defined in the project using CTest. ```bash ctest ``` -------------------------------- ### Fetch Google Test Dependency Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/cpp/test/CMakeLists.txt Fetches the Google Test framework from GitHub if the build flags for Google Test are enabled. Ensures the repository is cloned shallowly for faster downloads. ```cmake include(FetchContent) if (BUILD_APPROVAL_TESTS_WITH_GTEST OR BUILD_UNIT_TESTS_WITH_GTEST) FetchContent_Declare( googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG v1.16.0 GIT_SHALLOW TRUE ) FetchContent_MakeAvailable(googletest) endif() ``` -------------------------------- ### Piped Script Execution Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/bash/README.md Demonstrates a pure function script that can be piped multiple times. Input is provided via stdin and output is sent to stdout. ```bash $ echo -e 'Aged Brie|3|5\nOther Item|4|5' | > ./gilded_rose.sh | > ./gilded_rose.sh | > ./gilded_rose.sh Aged Brie|0|8 Other Item|1|2 ``` -------------------------------- ### Run Unit Tests (Windows Batch) Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/php/README.md Execute unit tests using the Windows batch file 'pu.bat', which is an alias for 'composer tests'. ```shell script pu.bat ``` -------------------------------- ### Run Failing Unit Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/jq/README.md Execute the shell script to run the unit tests. ```shell ./test-gilded-rose.sh ``` -------------------------------- ### Configure Gilded Rose Library Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/cpp/src/CMakeLists.txt Defines the library name, adds the library, specifies source files, and sets include directories for the Gilded Rose C++ project. ```cmake set(SRC_LIB_NAME GildedRoseLib) add_library(${SRC_LIB_NAME}) target_sources(${SRC_LIB_NAME} PRIVATE GildedRose.cc GildedRose.h) target_include_directories(${SRC_LIB_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) ``` -------------------------------- ### Run Static Analysis Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/php/README.md Perform static analysis on the code using PHPStan. This helps identify potential bugs and type errors. ```shell script composer phpstan ``` -------------------------------- ### Run TextTest Fixture with Number of Days Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/TypeScript/README.md Executes the TextTest fixture using ts-node, specifying the number of days to simulate. ```sh npx ts-node test/golden-master-text-test.ts 10 ``` -------------------------------- ### Run Gilded Rose Command-Line Program Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/csharp.xUnit/README.md Execute the Gilded Rose command-line program for a specified number of days. ```cmd GildedRose/bin/Debug/net8.0/GildedRose 10 ``` -------------------------------- ### Execute Item Update using CALL Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/plpgsql/README.md SQL statement to execute the 'update_quality' stored procedure, which updates the sell-in dates and qualities of all items. ```sql CALL update_quality(); ``` -------------------------------- ### Run Unit Tests in Watch Mode with npm Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/js-jest/README.md Runs all unit tests and automatically re-runs them when file changes are detected. Useful for TDD. ```sh npm run test:watch ``` -------------------------------- ### Run All Tests with Verbose Output Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/cpp/README.md Command to run all tests and display verbose output using CTest. ```bash ctest -VV ``` -------------------------------- ### Configure TextTest Executable Path Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/odin/README.md Specify the path to the Gilded Rose executable within the TextTest configuration file. Uncomment the line and replace the placeholder with your OS executable extension. ```text #executable:${TEXTTEST_HOME}/odin/gilded_rose ``` -------------------------------- ### Create Item Table Structure Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/plpgsql/README.md SQL script to create the 'item' table in the PostgreSQL database. This defines the schema for storing item data. ```sql CREATE TABLE item ( name VARCHAR(255) NOT NULL, sell_in INT NOT NULL, quality INT NOT NULL ); ``` -------------------------------- ### Run TextTest File with Yarn Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/rescript/README.md Execute the TextTest script, optionally specifying the number of days. ```sh yarn texttest [days] ``` -------------------------------- ### Run Gilded Rose Application with Specific Days Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/clojure/README.md Run the main Clojure application, specifying the number of days as a command-line argument. ```sh clojure -M:main 31 ``` -------------------------------- ### Load Update Quality Procedure Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/plpgsql/README.md SQL script to load the main 'update_quality' stored procedure into the database. This procedure contains the core logic for updating item qualities. ```sql CREATE OR REPLACE PROCEDURE update_quality() LANGUAGE plpgsql AS $$ DECLARE item_record RECORD; BEGIN FOR item_record IN SELECT * FROM item LOOP -- Decrease sell_in for all items UPDATE item SET sell_in = sell_in - 1 WHERE CURRENT OF item_record; -- Update quality based on item type and sell_in IF item_record.name = 'Aged Brie' THEN IF item_record.quality < 50 THEN UPDATE item SET quality = quality + 1 WHERE CURRENT OF item_record; END IF; ELSIF item_record.name = 'Backstage passes' THEN IF item_record.sell_in < 0 THEN UPDATE item SET quality = 0 WHERE CURRENT OF item_record; ELSIF item_record.sell_in < 5 THEN IF item_record.quality < 50 THEN UPDATE item SET quality = quality + 3 WHERE CURRENT OF item_record; END IF; ELSIF item_record.sell_in < 10 THEN IF item_record.quality < 50 THEN UPDATE item SET quality = quality + 2 WHERE CURRENT OF item_record; END IF; ELSE IF item_record.quality < 50 THEN UPDATE item SET quality = quality + 1 WHERE CURRENT OF item_record; END IF; END IF; ELSIF item_record.name = 'Sulfuras' THEN -- Sulfuras quality is always 80 and does not change NULL; ELSE -- Regular items IF item_record.quality > 0 THEN UPDATE item SET quality = quality - 1 WHERE CURRENT OF item_record; END IF; IF item_record.sell_in < 0 THEN IF item_record.quality > 0 THEN UPDATE item SET quality = quality - 1 WHERE CURRENT OF item_record; END IF; END IF; END IF; -- Ensure quality does not exceed 50 for non-Sulfuras items IF item_record.name != 'Sulfuras' AND item_record.quality > 50 THEN UPDATE item SET quality = 50 WHERE CURRENT OF item_record; END IF; END LOOP; END; $$; ``` -------------------------------- ### Run Texttest Simulation Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/janet/README.md Execute the texttest simulation for the Gilded Rose kata. This command generates output suitable for the texttest framework. ```sh janet test/texttest.janet ``` -------------------------------- ### Run RSpec Unit Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/ruby/README.md Execute the RSpec unit tests for the Gilded Rose kata by specifying the test file. ```bash rspec gilded_rose_spec.rb ``` -------------------------------- ### Set C Standard Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/c_cmocka/CMakeLists.txt Specifies the C programming language standard to be used for the project. ```cmake set(CMAKE_C_STANDARD 11) ``` -------------------------------- ### Generate Test Coverage Report with npm Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/js-jest/README.md Generates a test coverage report for the project. This helps identify untested code. ```sh npm run test:coverage ``` -------------------------------- ### Run Jest Unit Tests Source: https://github.com/emilybache/gildedrose-refactoring-kata/blob/main/TypeScript/README.md Executes all unit tests using the Jest test framework. ```sh npm run test:jest ```