Skip to contents

Sneaky way for testing. Flatten a segment element, fix the names to select the list element (. to $ and trail numbers with [[]]), and create string to use with expect_equal(). cat() the result and paste into test script. An even sneaker thing is to parse the text and evaluate it.

zz = create_test_text(segment)
eval(parse(text = zz))

Usage

create_test_text(x)

Arguments

x

list, segment from parsing