diff --git a/test/clj/game/cards/hardware_test.clj b/test/clj/game/cards/hardware_test.clj index f860b7d33c..131106629a 100644 --- a/test/clj/game/cards/hardware_test.clj +++ b/test/clj/game/cards/hardware_test.clj @@ -3973,7 +3973,7 @@ (take-credits state :corp) (play-from-hand state :runner "Prognostic Q-Loop") (card-ability state :runner (get-hardware state 0) 1) - (is (last-log-contains? state "Runner spends \\[Click] and pays 1 \\[Credits] to install Prognostic Q-Loop.") + (is (last-log-contains? state "Runner spends [Click] and pays 1 [Credits] to install Prognostic Q-Loop.") "Shouldn't print anything to log as the stack is empty"))) (deftest prognostic-q-loop-orders-correctly-with-other-on-run-triggers-when-firing-first-issue-4973 diff --git a/test/clj/game/cards/ice_test.clj b/test/clj/game/cards/ice_test.clj index 32bf658c32..d38c5ebdd5 100644 --- a/test/clj/game/cards/ice_test.clj +++ b/test/clj/game/cards/ice_test.clj @@ -823,7 +823,7 @@ (is (changed? [(:credit (get-corp)) +1] (card-ability state :runner cor 0) (click-prompt state :runner "End the run") - (is (last-log-contains? state "Corp uses Bailiff to gain 1 \\[Credits\\]") + (is (last-log-contains? state "Corp uses Bailiff to gain 1 [Credits]") "Correct message")) "Gained 1c from subroutines being broken")))) @@ -902,8 +902,8 @@ (is (changed? [(:credit (get-corp)) +2] (auto-pump-and-break state cor)) "Gained 2c from the runner breaking") - (is (last-n-log-contains? state 2 "Corp uses Bailiff to gain 1 \\[Credits\\]")) - (is (last-n-log-contains? state 3 "Corp uses Bailiff to gain 1 \\[Credits\\]")))))) + (is (last-n-log-contains? state 2 "Corp uses Bailiff to gain 1 [Credits]")) + (is (last-n-log-contains? state 3 "Corp uses Bailiff to gain 1 [Credits]")))))) (deftest ballista ;; Ballista @@ -2874,7 +2874,7 @@ (card-ability state :runner cor 0) (click-prompt state :runner "End the run unless the Runner pays 3 [Credits]") (click-prompt state :runner "Done") - (is (last-log-contains? state "Corp uses Gold Farmer to force the runner to lose 1 \\[Credits\\] for breaking printed subs") + (is (last-log-contains? state "Corp uses Gold Farmer to force the runner to lose 1 [Credits] for breaking printed subs") "Correct message")) "Paid 1c + 1c for breaking")))) @@ -2894,9 +2894,9 @@ (run-continue state) (is (changed? [(:credit (get-runner)) -4] (auto-pump-and-break state cor) - (is (last-n-log-contains? state 2 "Corp uses Gold Farmer to force the runner to lose 1 \\[Credits\\] for breaking printed subs") + (is (last-n-log-contains? state 2 "Corp uses Gold Farmer to force the runner to lose 1 [Credits] for breaking printed subs") "Correct messages") - (is (last-n-log-contains? state 3 "Corp uses Gold Farmer to force the runner to lose 1 \\[Credits\\] for breaking printed subs"))) + (is (last-n-log-contains? state 3 "Corp uses Gold Farmer to force the runner to lose 1 [Credits] for breaking printed subs"))) "Paid 2c + 2c for breaking")))) (deftest gold-farmer-interaction-with-paperclip @@ -6572,7 +6572,7 @@ (card-subroutine state :corp shiro 1) (let [credits (:credit (get-corp))] (click-prompt state :corp "Yes") - (is (last-log-contains? state "pays 1 \\[Credits\\]") "Payment is logged") + (is (last-log-contains? state "pays 1 [Credits]") "Payment is logged") (is (last-log-contains? state "keep the Runner from breaching R&D") "Prevention is logged") (is (= (dec credits) (:credit (get-corp))) "Corp pays 1 to prevent access")))))) diff --git a/test/clj/game/cards/identities_test.clj b/test/clj/game/cards/identities_test.clj index a03e9e1b52..332c310c9b 100644 --- a/test/clj/game/cards/identities_test.clj +++ b/test/clj/game/cards/identities_test.clj @@ -1011,7 +1011,7 @@ (is (changed? [(:credit (get-runner)) -1] (run-on state :hq)) "Paid 1c to run on HQ") - (is (last-log-contains? state "spends \\[Click\\] and pays 1 \\[Credits\\] to make a run on HQ") "Should have correct log with credits price for the run"))) + (is (last-log-contains? state "spends [Click] and pays 1 [Credits] to make a run on HQ") "Should have correct log with credits price for the run"))) (deftest earth-station-sea-headquarters-front-side-flipping-costs-1-click ;; Flipping costs 1 click @@ -1021,7 +1021,7 @@ (card-ability state :corp (get-in @state [:corp :identity]) 0)) "Paid 1 click to flip Earth Station") (is (:flipped (get-in @state [:corp :identity])) "Earth Station is on flip side") - (is (last-log-contains? state "Corp spends \\[Click\\] to use Earth Station: SEA Headquarters to flip their identity to Earth Station: Ascending to Orbit.") "Should have correct log with click price"))) + (is (last-log-contains? state "Corp spends [Click] to use Earth Station: SEA Headquarters to flip their identity to Earth Station: Ascending to Orbit.") "Should have correct log with click price"))) (deftest earth-station-sea-headquarters-flip-side-no-additional-cost-to-run-hq ;; No additional cost to run HQ @@ -1056,7 +1056,7 @@ (is (changed? [(:credit (get-runner)) -6] (run-on state :remote1)) "Paid 6c to run on remote server") - (is (last-log-contains? state "spends \\[Click\\] and pays 6 \\[Credits\\] to make a run on Server 1") "Should have correct log with credits price for the run"))) + (is (last-log-contains? state "spends [Click] and pays 6 [Credits] to make a run on Server 1") "Should have correct log with credits price for the run"))) (deftest earth-station-sea-headquarters-flip-side-flip-back-on-successful-hq-run ;; Flip back on successful HQ run diff --git a/test/clj/game/cards/programs_test.clj b/test/clj/game/cards/programs_test.clj index bdcab72357..23466313ca 100644 --- a/test/clj/game/cards/programs_test.clj +++ b/test/clj/game/cards/programs_test.clj @@ -1167,7 +1167,7 @@ (click-prompt state :runner "Yes") (click-prompt state :runner "3")) "Runner uses Bug") - (is (last-log-contains? state "Runner pays 6 \\[Credits] to use Bug to force the Corp to reveal they drew Hedge Fund, Hedge Fund, and Hedge Fund.")))) + (is (last-log-contains? state "Runner pays 6 [Credits] to use Bug to force the Corp to reveal they drew Hedge Fund, Hedge Fund, and Hedge Fund.")))) (deftest buzzsaw ;; Buzzsaw @@ -2882,7 +2882,7 @@ (rez state :corp (get-ice state :hq 0)) (run-continue state) (auto-pump-and-break state (get-program state 0)) - (is (second-last-log-contains? state "Runner pays 0 \\[Credits\\] to use Euler to break all 2 subroutines on Enigma.") "Correct log with correct cost") + (is (second-last-log-contains? state "Runner pays 0 [Credits] to use Euler to break all 2 subroutines on Enigma.") "Correct log with correct cost") (core/continue state :corp nil) (run-jack-out state) (take-credits state :runner) @@ -2890,7 +2890,7 @@ (run-on state :hq) (run-continue state) (auto-pump-and-break state (get-program state 0)) - (is (second-last-log-contains? state "Runner pays 2 \\[Credits\\] to use Euler to break all 2 subroutines on Enigma.") "Correct second log with correct cost") + (is (second-last-log-contains? state "Runner pays 2 [Credits] to use Euler to break all 2 subroutines on Enigma.") "Correct second log with correct cost") (core/continue state :corp nil))) (deftest expert-schedule-analyzer @@ -4760,14 +4760,14 @@ (run-on state "HQ") (run-continue state) (auto-pump-and-break state (refresh maven)) - (is (second-last-log-contains? state "Runner pays 4 \\[Credits\\] to use Maven to break all 2 subroutines on Border Control.") "Correct log with autopump ability") + (is (second-last-log-contains? state "Runner pays 4 [Credits] to use Maven to break all 2 subroutines on Border Control.") "Correct log with autopump ability") (core/continue state :corp nil) (run-jack-out state) (run-on state "HQ") (run-continue state) (card-ability state :runner (refresh maven) 0) (click-prompt state :runner "End the run") - (is (last-log-contains? state "Runner pays 2 \\[Credits\\] to use Maven to break 1 subroutine on Border Control.") "Correct log with single sub break")))) + (is (last-log-contains? state "Runner pays 2 [Credits] to use Maven to break 1 subroutine on Border Control.") "Correct log with single sub break")))) (deftest mayfly ;; Mayfly @@ -4827,7 +4827,7 @@ (run-on state "HQ") (run-continue state) (auto-pump-and-break state (refresh mimic)) - (is (second-last-log-contains? state "Runner pays 2 \\[Credits\\] to use Mimic to break all 2 subroutines on Pup") "Correct log with autopump ability") + (is (second-last-log-contains? state "Runner pays 2 [Credits] to use Mimic to break all 2 subroutines on Pup") "Correct log with autopump ability") (core/continue state :corp nil) (run-jack-out state) (is (zero? (:credit (get-runner))) "Runner spent 2 credits to break Pup") @@ -4869,7 +4869,7 @@ (run-continue state) (is (= 2 (count (:abilities (refresh mimic)))) "Auto pump and break ability on Mimic is available") (auto-pump-and-break state (refresh mimic)) - (is (second-last-log-contains? state "Runner pays 3 \\[Credits\\] to use Mimic to break all 3 subroutines on Zed 2.0") "Correct log with autopump ability") + (is (second-last-log-contains? state "Runner pays 3 [Credits] to use Mimic to break all 3 subroutines on Zed 2.0") "Correct log with autopump ability") (core/continue state :corp nil) (run-jack-out state) (is (= 1 (:credit (get-runner))) "Runner spent 3 credits to break Zed 2.0")))) diff --git a/test/clj/game/cards/resources_test.clj b/test/clj/game/cards/resources_test.clj index 5c5a5544fd..6a0cd418b6 100644 --- a/test/clj/game/cards/resources_test.clj +++ b/test/clj/game/cards/resources_test.clj @@ -1379,10 +1379,10 @@ (take-credits state :corp) (play-from-hand state :runner "Dadiana Chacon") (play-from-hand state :runner "Corroder") - (is (last-n-log-contains? state 3 "Runner spends \\[Click\\] and pays 0 \\[Credits\\] to install Dadiana Chacon.")) + (is (last-n-log-contains? state 3 "Runner spends [Click] and pays 0 [Credits] to install Dadiana Chacon.")) (is (last-n-log-contains? state 2 "Runner uses Dadiana Chacon to suffer 3 meat damage.")) (is (second-last-log-contains? state "Runner trashes Corroder, Corroder, and Corroder due to meat damage.")) - (is (last-log-contains? state "Runner spends \\[Click\\] and pays 2 \\[Credits\\] to install Corroder.")))) + (is (last-log-contains? state "Runner spends [Click] and pays 2 [Credits] to install Corroder.")))) (deftest daeg-first-net-cat ;; Daeg, First Net-Cat - charge on score/steal @@ -3874,7 +3874,7 @@ (is (zero? (:click (get-runner))) "Should now have 0 clicks") (is (= 1 (count (:discard (get-runner)))) "Logic Bomb should be discarded") (is (last-log-contains? state "use Logic Bomb")) - (is (last-log-contains? state "\\[Click\\]\\[Click\\]") "Log should mention 2 clicks"))) + (is (last-log-contains? state "[Click][Click]") "Log should mention 2 clicks"))) (deftest logic-bomb-if-the-runner-has-no-clicks-left ;; if the runner has no clicks left @@ -3894,7 +3894,7 @@ (is (zero? (:click (get-runner))) "Should still have 0 clicks") (is (= 1 (count (:discard (get-runner)))) "Logic Bomb should be discarded") (is (last-log-contains? state "use Logic Bomb")) - (is (not (last-log-contains? state "\\[Click\\]")) "Log shouldn't mention any clicks"))) + (is (not (last-log-contains? state "[Click]")) "Log shouldn't mention any clicks"))) (deftest london-library ;; Install non-virus programs on London library. Includes #325/409 @@ -4520,7 +4520,7 @@ (is (changed? [(:credit (get-runner)) -1] (play-from-hand state :runner "Order of Sol")) "Only spends 1 credit total to install Order of Sol") - (is (last-log-contains? state "Runner uses Order of Sol to gain 1 \\[Credits].")))) + (is (last-log-contains? state "Runner uses Order of Sol to gain 1 [Credits].")))) (deftest order-of-sol-get-down-to-zero-credits-from-playing-an-event ;; Get down to zero credits from playing an event @@ -4532,7 +4532,7 @@ (is (changed? [(:credit (get-runner)) 5] (play-from-hand state :runner "Sure Gamble")) "Gain 5 total credits from playing Sure Gamble") - (is (last-n-log-contains? state 2 "Runner uses Order of Sol to gain 1 \\[Credits].")))) + (is (last-n-log-contains? state 2 "Runner uses Order of Sol to gain 1 [Credits].")))) (deftest order-of-sol-losing-credits ;; Losing credits @@ -4548,7 +4548,7 @@ (is (changed? [(:credit (get-runner)) 0] (rez state :corp (get-content state :remote1 0))) "Gain and lose 1 credit") - (is (last-log-contains? state "Runner uses Order of Sol to gain 1 \\[Credits].")))) + (is (last-log-contains? state "Runner uses Order of Sol to gain 1 [Credits].")))) (deftest pad-tap ;; PAD Tap @@ -4822,21 +4822,21 @@ (is (changed? [(:credit (get-runner)) -4] (click-card state :runner mo)) "Pay 4 for MOpus install (1+5-2)") - (is (second-last-log-contains? state "Runner pays 1 \\[Credits\\] to use Paule's Café to install hosted card\\.") "Correct message for Paule usage") - (is (last-log-contains? state "Runner pays 3 \\[Credits\\] to install Magnum Opus using Paule's Café\\.") "Correct message for MOpus install") + (is (second-last-log-contains? state "Runner pays 1 [Credits] to use Paule's Café to install hosted card\\.") "Correct message for Paule usage") + (is (last-log-contains? state "Runner pays 3 [Credits] to install Magnum Opus using Paule's Café\\.") "Correct message for MOpus install") (card-ability state :runner pau 1) (is (changed? [(:credit (get-runner)) -4] (click-card state :runner des)) "Pay 4 for Desperado install (1+3)") - (is (second-last-log-contains? state "Runner pays 1 \\[Credits\\] to use Paule's Café to install hosted card\\.") "Correct message for Paule usage") - (is (last-log-contains? state "Runner pays 3 \\[Credits\\] to install Desperado using Paule's Café\\.") "Correct message for Desperado install") + (is (second-last-log-contains? state "Runner pays 1 [Credits] to use Paule's Café to install hosted card\\.") "Correct message for Paule usage") + (is (last-log-contains? state "Runner pays 3 [Credits] to install Desperado using Paule's Café\\.") "Correct message for Desperado install") (take-credits state :runner) (card-ability state :runner pau 1) (is (changed? [(:credit (get-runner)) -3] (click-card state :runner cor)) "Pay 3 for Corroder install in Corp turn (1+2)") - (is (second-last-log-contains? state "Runner pays 1 \\[Credits\\] to use Paule's Café to install hosted card\\.") "Correct message for Paule usage") - (is (last-log-contains? state "Runner pays 2 \\[Credits\\] to install Corroder using Paule's Café\\.") "Correct message for Corroder install"))))) + (is (second-last-log-contains? state "Runner pays 1 [Credits] to use Paule's Café to install hosted card\\.") "Correct message for Paule usage") + (is (last-log-contains? state "Runner pays 2 [Credits] to install Corroder using Paule's Café\\.") "Correct message for Corroder install"))))) (deftest paule-s-cafe-can-t-lower-cost-below-1-issue-4816 ;; Can't lower cost below 1. Issue #4816 @@ -4858,8 +4858,8 @@ (card-ability state :runner pau 1) (click-card state :runner cor)) "Pay 1 credit for Corroder (2 - 4 + 1 base)") - (is (second-last-log-contains? state "Runner pays 1 \\[Credits\\] to use Paule's Café to install hosted card\\.") "Correct message for Paule usage") - (is (last-log-contains? state "Runner pays 0 \\[Credits\\] to install Corroder using Paule's Café\\.") "Correct message for Corroder install"))))) + (is (second-last-log-contains? state "Runner pays 1 [Credits] to use Paule's Café to install hosted card\\.") "Correct message for Paule usage") + (is (last-log-contains? state "Runner pays 0 [Credits] to install Corroder using Paule's Café\\.") "Correct message for Corroder install"))))) (deftest penumbral-toolkit-install-cost-reduction-after-hq-run ;; install cost reduction after HQ run diff --git a/test/clj/game/cards/upgrades_test.clj b/test/clj/game/cards/upgrades_test.clj index 44e9f27adb..5190107bd7 100644 --- a/test/clj/game/cards/upgrades_test.clj +++ b/test/clj/game/cards/upgrades_test.clj @@ -1024,8 +1024,8 @@ (take-credits state :corp) (play-from-hand state :runner "Dirty Laundry") (click-prompt state :runner "HQ") - (is (second-last-log-contains? state "Runner spends \\[Click\\] and pays 2 \\[Credits\\] to play Dirty Laundry.")) - (is (last-log-contains? state "Runner spends \\[Click\\] and pays 1 \\[Credits\\] to make a run on HQ.")))) + (is (second-last-log-contains? state "Runner spends [Click] and pays 2 [Credits] to play Dirty Laundry.")) + (is (last-log-contains? state "Runner spends [Click] and pays 1 [Credits] to make a run on HQ.")))) (deftest corporate-troubleshooter ;; Corporate Troubleshooter - Pay X credits and trash to add X strength to a piece of rezzed ice diff --git a/test/clj/game/core/actions_test.clj b/test/clj/game/core/actions_test.clj index d5ddf28dfd..001f1bf6ee 100644 --- a/test/clj/game/core/actions_test.clj +++ b/test/clj/game/core/actions_test.clj @@ -87,9 +87,9 @@ (run-continue state) (card-side-ability state :runner ice 0) (click-prompt state :runner "End the run") - (is (last-log-contains? state "Runner loses \\[Click\\] to use Eli 1.0 to break 1 subroutine on Eli 1.0")) + (is (last-log-contains? state "Runner loses [Click] to use Eli 1.0 to break 1 subroutine on Eli 1.0")) (click-prompt state :runner "End the run") - (is (last-log-contains? state "Runner loses \\[Click\\] to use Eli 1.0 to break 1 subroutine on Eli 1.0"))) + (is (last-log-contains? state "Runner loses [Click] to use Eli 1.0 to break 1 subroutine on Eli 1.0"))) (run-continue state) (run-continue state) (click-prompt state :runner "No action") diff --git a/test/clj/game/core/costs_test.clj b/test/clj/game/core/costs_test.clj index 36ed85f1f2..9ab21eb258 100644 --- a/test/clj/game/core/costs_test.clj +++ b/test/clj/game/core/costs_test.clj @@ -52,37 +52,37 @@ :corp {:hand [(qty "Ice Wall" 2) "Turtlebacks" "Beanstalk Royalties" "Hedge Fund" "Project Beale" "Ben Musashi"]}}) (core/gain state :corp :click 10) (play-from-hand state :corp "Ice Wall" "HQ") - (is (last-log-contains? state "Corp spends \\[Click\\] and pays 0 \\[Credits\\] to install ice protecting HQ.") "Install ice, zero cost") + (is (last-log-contains? state "Corp spends [Click] and pays 0 [Credits] to install ice protecting HQ.") "Install ice, zero cost") (play-from-hand state :corp "Ice Wall" "HQ") - (is (last-log-contains? state "Corp spends \\[Click\\] and pays 1 \\[Credits\\] to install ice protecting HQ.") "Install ice, one cost") + (is (last-log-contains? state "Corp spends [Click] and pays 1 [Credits] to install ice protecting HQ.") "Install ice, one cost") (play-from-hand state :corp "Turtlebacks" "New remote") - (is (last-log-contains? state "Corp spends \\[Click\\] to install a card in Server 1.") "Install asset, zero cost") + (is (last-log-contains? state "Corp spends [Click] to install a card in Server 1.") "Install asset, zero cost") (play-from-hand state :corp "Ben Musashi" "Server 1") - (is (last-log-contains? state "Corp spends \\[Click\\] to install a card in Server 1.") "Install upgrade, zero cost") + (is (last-log-contains? state "Corp spends [Click] to install a card in Server 1.") "Install upgrade, zero cost") (play-from-hand state :corp "Project Beale" "New remote") - (is (last-log-contains? state "Corp spends \\[Click\\] to install a card in Server 2.") "Install agenda, zero cost") + (is (last-log-contains? state "Corp spends [Click] to install a card in Server 2.") "Install agenda, zero cost") (play-from-hand state :corp "Beanstalk Royalties") - (is (second-last-log-contains? state "Corp spends \\[Click\\] and pays 0 \\[Credits\\] to play Beanstalk Royalties.") "Play operation, zero cost") + (is (second-last-log-contains? state "Corp spends [Click] and pays 0 [Credits] to play Beanstalk Royalties.") "Play operation, zero cost") (play-from-hand state :corp "Hedge Fund") - (is (second-last-log-contains? state "Corp spends \\[Click\\] and pays 5 \\[Credits\\] to play Hedge Fund.") "Play operation, five cost") + (is (second-last-log-contains? state "Corp spends [Click] and pays 5 [Credits] to play Hedge Fund.") "Play operation, five cost") (take-credits state :corp) (core/gain state :runner :click 10) (play-from-hand state :runner "Diesel") - (is (second-last-log-contains? state "Runner spends \\[Click\\] and pays 0 \\[Credits\\] to play Diesel.") "Play event, zero cost") + (is (second-last-log-contains? state "Runner spends [Click] and pays 0 [Credits] to play Diesel.") "Play event, zero cost") (play-from-hand state :runner "Sure Gamble") - (is (second-last-log-contains? state "Runner spends \\[Click\\] and pays 5 \\[Credits\\] to play Sure Gamble.") "Play event, five cost") + (is (second-last-log-contains? state "Runner spends [Click] and pays 5 [Credits] to play Sure Gamble.") "Play event, five cost") (play-from-hand state :runner "Clot") - (is (last-log-contains? state "Runner spends \\[Click\\] and pays 2 \\[Credits\\] to install Clot.") "Install program, two cost") + (is (last-log-contains? state "Runner spends [Click] and pays 2 [Credits] to install Clot.") "Install program, two cost") (play-from-hand state :runner "Misdirection") - (is (last-log-contains? state "Runner spends \\[Click\\] and pays 0 \\[Credits\\] to install Misdirection.") "Install program, zero cost") + (is (last-log-contains? state "Runner spends [Click] and pays 0 [Credits] to install Misdirection.") "Install program, zero cost") (play-from-hand state :runner "Career Fair") - (is (last-log-contains? state "Runner spends \\[Click\\] and pays 0 \\[Credits\\] to play Career Fair.") "Play Career Fair, zero cost") + (is (last-log-contains? state "Runner spends [Click] and pays 0 [Credits] to play Career Fair.") "Play Career Fair, zero cost") (click-card state :runner (find-card "Daily Casts" (:hand (get-runner)))) - (is (last-log-contains? state "Runner pays 0 \\[Credits\\] to install Daily Casts.") "Choose Daily cast, zero cost install") + (is (last-log-contains? state "Runner pays 0 [Credits] to install Daily Casts.") "Choose Daily cast, zero cost install") (play-from-hand state :runner "Daily Casts") - (is (last-log-contains? state "Runner spends \\[Click\\] and pays 3 \\[Credits\\] to install Daily Casts.") "Install resource, three cost") + (is (last-log-contains? state "Runner spends [Click] and pays 3 [Credits] to install Daily Casts.") "Install resource, three cost") (run-on state :archives) - (is (last-log-contains? state "Runner spends \\[Click\\] to make a run on Archives.") "Initiate run, zero cost"))) + (is (last-log-contains? state "Runner spends [Click] to make a run on Archives.") "Initiate run, zero cost"))) (testing "Issue #4295: Auto-pumping Icebreaker with pay-credits prompt" (do-game (new-game {:runner {:hand ["Corroder" "Net Mercur" "Cloak"]} @@ -122,7 +122,7 @@ (auto-pump-and-break state (refresh cor)) (is (= 3 (get-strength (refresh cor))) "Corroder now at 3 strength") (is (empty? (remove :broken (:subroutines (refresh hive)))) "Hive is now fully broken") - (is (second-last-log-contains? state "Runner pays 6 \\[Credits\\] to increase the strength of Corroder to 3 and break all 5 subroutines on Hive.") "Should write correct pump & break price to log")))) + (is (second-last-log-contains? state "Runner pays 6 [Credits] to increase the strength of Corroder to 3 and break all 5 subroutines on Hive.") "Should write correct pump & break price to log")))) (testing "Auto-pump first" (do-game (new-game {:runner {:hand ["Corroder"]} @@ -138,10 +138,10 @@ (run-continue state) (auto-pump state (refresh cor)) (is (= 3 (get-strength (refresh cor))) "Corroder now at 3 strength") - (is (last-log-contains? state "Runner pays 1 \\[Credits\\] to increase the strength of Corroder to 3.") "Should write correct pump price to log") + (is (last-log-contains? state "Runner pays 1 [Credits] to increase the strength of Corroder to 3.") "Should write correct pump price to log") (auto-pump-and-break state (refresh cor)) (is (empty? (remove :broken (:subroutines (refresh hive)))) "Hive is now fully broken") - (is (second-last-log-contains? state "Runner pays 5 \\[Credits\\] to use Corroder to break all 5 subroutines on Hive.") "Should write correct break price to log")))) + (is (second-last-log-contains? state "Runner pays 5 [Credits] to use Corroder to break all 5 subroutines on Hive.") "Should write correct break price to log")))) (testing "Inability to pay for auto-pump" (do-game (new-game {:runner {:hand ["Corroder"]} @@ -202,7 +202,7 @@ (is (= 4 (count (remove :broken (:subroutines (refresh hive))))) "Only broken 1 sub") (auto-pump-and-break state (refresh cor)) (is (empty? (remove :broken (:subroutines (refresh hive)))) "Hive is now fully broken") - (is (second-last-log-contains? state "Runner pays 4 \\[Credits\\] to use Corroder to break the remaining 4 subroutines on Hive.") "Should write correct price to log"))))) + (is (second-last-log-contains? state "Runner pays 4 [Credits] to use Corroder to break the remaining 4 subroutines on Hive.") "Should write correct price to log"))))) (deftest run-additional-costs (testing "If runner cannot pay additional cost, server not shown as an option for run events or click to run button" diff --git a/test/clj/game/core/say_test.clj b/test/clj/game/core/say_test.clj index 9d2fe01eec..cce9925b1b 100644 --- a/test/clj/game/core/say_test.clj +++ b/test/clj/game/core/say_test.clj @@ -298,7 +298,7 @@ (play-from-hand state :runner "Wireless Net Pavilion") (let [wnp1 (get-resource state 0)] (core/command-parser state :runner {:user user :text "/unique"}) - (is (last-log-contains? state "\\[!\\]Runner uses a command: /unique") "Correct message") + (is (last-log-contains? state "[!]Runner uses a command: /unique") "Correct message") (click-card state :runner wnp1) (is (not (unique? (refresh wnp1))) "WNP is not unique anymore") (is (last-log-contains? state "Runner uses /unique command to make Wireless Net Pavilion not unique\\.") "Correct message") diff --git a/test/clj/game/test_framework.clj b/test/clj/game/test_framework.clj index 11e4c728ae..37559246af 100644 --- a/test/clj/game/test_framework.clj +++ b/test/clj/game/test_framework.clj @@ -903,8 +903,7 @@ `(do ~@bundles))) (defn escape-log-string [s] - ; (str/escape s {\[ "\\[" \] "\\]"}) - s) + (str/escape s {\[ "\\[" \] "\\]"})) (defn last-log-contains? [state content]