Need testing for interactive mode

Bug #583661 reported by Matt Giuca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mars
Triaged
Wishlist
Matt Giuca

Bug Description

It is currently not possible to write test cases for interactive mode. This is becoming an issue, as interactive mode represents a very different semantics to normal code, and many bugs are surfacing. Currently, it is possible to test a single line of interactive mode using the -c argument (the "runtime tests" use this feature), but not a sequence of instructions.

Add a new type of test case for interactive sessions, with a "stdin" interactive session, and expected output. Include cases for the following:

x = 1 # Test using comments
x # Test print-out of local variables

add = 7
add # Test overriding globals
# Also test calling a function which calls add to make sure it still calls the global variable "add"

x = add(1, add(2, 3)) # Test nested expressions (temp vars) in interactive

x = box(4)
x = unbox(x)
(Test re-assigning the same variable to a different type -- crucially, the assignment instruction includes the old value)

Test as many interactive commands as possible.

Revision history for this message
Matt Giuca (mgiuca) wrote :

Also note that with this in place, we could replace a lot of separate "compiler error" test cases with a single interactive session, which prints and recovers from single-line errors.

Matt Giuca (mgiuca)
Changed in mars:
importance: High → Medium
Matt Giuca (mgiuca)
Changed in mars:
importance: Medium → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.