Sha256: 4e7bcd0c4b6b41896a09a7ee35a86917ef197a896cc2bcf606e491ebbcd1d07f
Contents?: true
Size: 889 Bytes
Versions: 4
Compression:
Stored size: 889 Bytes
Contents
#include "catch.hpp" #include <compiler.h> #include <globals.h> #include <runner.h> #include <story.h> using namespace ink::runtime; SCENARIO("Story with tags and glues", "[glue, tags]") { GIVEN("lines intersected with tags and glue") { auto ink = story::from_file(INK_TEST_RESOURCE_DIR "NoEarlyTags.bin"); auto thread = ink->new_runner(); WHEN("no glue") { std::string out = thread->getline(); REQUIRE(out == "Hey there, nice to meet you!\n"); REQUIRE(thread->num_tags() == 2); } WHEN("glue: tags will stop lookahead") { thread->getline(); std::string out = thread->getline(); REQUIRE(out == "Hey, I'm Hey and this is YOU, nice to meet you too!\n"); REQUIRE(thread->num_tags() == 3); out = thread->getline(); REQUIRE(out == "I'm Do! Most people can't pronounce it, just think 'Kee-vah\".\n"); REQUIRE(thread->num_tags() == 5); } } }
Version data entries
4 entries across 4 versions & 1 rubygems