Sha256: 8152dcc9e2231ddf3b9b6a1aed497738b13045ca8c968ba2a7048376c60be3e0
Contents?: true
Size: 895 Bytes
Versions: 4
Compression:
Stored size: 895 Bytes
Contents
#include "catch.hpp" #include <story.h> #include <globals.h> #include <runner.h> #include <compiler.h> using namespace ink::runtime; SCENARIO("a story with a white space infront of an conditional Divert", "[Output]") { // based on https://github.com/JBenda/inkcpp/issues/71 GIVEN("A story") { auto ink = story::from_file(INK_TEST_RESOURCE_DIR "EmptyStringForDivert.bin"); runner thread = ink->new_runner(); WHEN("run") { THEN("print 'This displays first'") { thread->getall(); REQUIRE(thread->has_choices()); thread->choose(0); REQUIRE(thread->getall() == "This displays first\n"); REQUIRE(thread->has_choices()); thread->choose(0); REQUIRE(thread->getall() == "This is the continuation.\n"); REQUIRE(thread->has_choices()); thread->choose(0); REQUIRE(thread->getall() == ""); REQUIRE(! thread->has_choices()); } } } }
Version data entries
4 entries across 4 versions & 1 rubygems