Closed brandonsturgeon closed 1 year ago
This PR adds a new method on stubs. It lets you tell a stub to return a sequence of values as it's called.
stub( net, "ReadString" ).returnsSequence( { "first", "second", "third", "fourth", "fifth", [50] = "fiftieth" }, "" )
Would effectively translate to:
print( net.ReadString() ) > first print( net.ReadString() ) > second print( net.ReadString() ) > third print( net.ReadString() ) > fourth print( net.ReadString() ) > fifth print( net.ReadString() ) > "" ... 44 calls later print( net.ReadString() ) > fiftieth print( net.ReadString() ) > ""
I tested this reasonably well, so I'm just gonna merge it and fix issues that pop up with it 🙃
This PR adds a new method on stubs. It lets you tell a stub to return a sequence of values as it's called.
Would effectively translate to:
I tested this reasonably well, so I'm just gonna merge it and fix issues that pop up with it 🙃