diff --git a/backend/api/deck_test.go b/backend/api/deck_test.go index 70ccd84..4b11e6c 100644 --- a/backend/api/deck_test.go +++ b/backend/api/deck_test.go @@ -52,11 +52,23 @@ func TestDecompress(t *testing.T) { shouldError: false, }, { - desc: "Basic compression", - input: "love|slay the||I &0 &0 &1 relics and &1 spire", + desc: "Nested compression succeeds", + input: "love|the|slay &1||I &0 &0 &2 relics and &2 spire", output: "I love love slay the relics and slay the spire", shouldError: false, }, + { + desc: "Interleaved compression succeeds", + input: "AAA|BBB&|0CCC||&1&2", + output: "BBBAAACCC", + shouldError: false, + }, + { + desc: "Interleaved repeated compression fails", + input: "AAA|BBB&|1CCC||&1&2", + output: "BBB&1CCC", + shouldError: false, + }, { desc: "Small Deck", input: "card|junk||0,1,1,0,2,0;;;&01;&1;x;;&02;&1;y;;&03;&1;z",