more precise manual tests

akkartik
Apr 18, 2025, 3:52 PM
LEEZTZCS6OGACOW7J5Q6YIHNOUDMGYHTD6UUJQM3L2MVDP2XAUYQC

Dependencies

  • [2] M6S4MJKY bugfix: wasn't recovering from errors
  • [3] LDMKBYNY clean up a stale manual test
  • [4] POQ23S4H fix startup test failures from the driver
  • [5] JNFEDGVZ confirmed error-recovery in a few more parts
  • [6] MZ3DMYPD start sketching out a scrollbar
  • [7] 5XQ4Y7NU reorg manual tests doc
  • [8] 3GC3WIB6 bugfix: recover from error on new command
  • [9] 36Z442IV back to commit 8123959e52f without code editing
  • [10] JIK7ZRYI bugfix: imprecision in drawing
  • [11] JOPVPUSA editing source code from within the app
  • [12] DTBFNHJD manual tests for the protocol with the driver
  • [13] 5WHW3IDO fix initialization errors using driver.love
  • [14] 2CTN2IEF Merge lines.love
  • [*] BJ5X5O4A let's prevent the text cursor from ever getting on a drawing

Change contents

  • edit in Manual_tests.md at line 27
    [6.1841][6.1841:1842](),[6.1842][7.26:646](),[7.26][7.26:646](),[7.646][7.211091:211092](),[7.211091][7.211091:211092](),[7.211092][7.647:867](),[7.867][7.41:144](),[7.144][7.867:1098](),[7.867][7.867:1098](),[7.1098][3.21:44](),[3.44][7.1242:1425](),[7.1242][7.1242:1425]()
    ### Protocol with driver; error-handling
    * clone this repo to a new client app, clear its save dir[1], run it, run the
    driver, add a definition:
    ```
    on.draw = function()
    end
    ```
    Hit F4. No error.
    Quit driver, quit client app. Restart client app. No error.
    * clone this repo to a new client app, clear its save dir, run it, run the
    driver, add a definition that draws to screen:
    ```
    on.draw = function()
    love.graphics.print('hello!', 50,50)
    end
    ```
    Hit F4. Client app shows 'hello!'
    Quit driver, quit client app. Restart client app. No error. Client app shows 'hello!'
    * clone this repo to a new client app, clear its save dir, run it, run the
    driver, add a definition containing invalid Lua:
    ```
    on.draw = function(
    ```
    Hit F4. Driver shows an error under the definition.
    Fix the definition:
    ```
    on.draw = function()
    end
    ```
    Hit F4. The error disappears.
    * clone this repo to a new client app, clear its save dir, run it, run the
    driver, add a definition containing invalid Lua:
    ```
    on.draw = function(
    ```
    Hit F4. Driver shows an error under the definition as before.
    Quit the client app.
    Restart the client app. It loads up without error.
    Switch back to the driver. Fix the definition.
    ```
    on.draw = function()
    end
    ```
    Hit F4. The error disappears.
  • replacement in Manual_tests.md at line 28
    [7.1426][5.24:103](),[5.103][7.1426:1501](),[7.1262][7.1426:1501](),[7.1426][7.1426:1501](),[7.1501][5.104:160](),[5.160][7.1317:1627](),[7.1317][7.1317:1627]()
    Driver can connect to app on errors in on.initialize (and `on.load_settings`).
    * clone this repo to a new client app, clear its save dir, run it, run the
    driver, define `on.initialize` with a run-time error:
    ```
    on.initialize = function()
    foo = bar+1
    end
    ```
    Hit F4.
    Quit the client app and restart. App shows an error.
    Edit `on.initialize` in the driver and remove the error:
    ```
    on.initialize = function()
    end
    ```
    Hit F4. The error disappears from the app and driver.
    [7.1426]
    [7.1627]
    Editing:
    * The upstream template-live-editor needs to pass all its manual tests.
  • edit in Manual_tests.md at line 31
    [7.1628][7.1628:1703](),[7.1703][5.161:217](),[5.217][7.1757:2000](),[7.1757][7.1757:2000](),[7.2000][5.218:1177](),[5.1177][7.2000:2001](),[7.2000][7.2000:2001](),[7.2001][4.190:256](),[4.256][7.2001:2076](),[7.2001][7.2001:2076](),[7.2076][4.257:1080](),[4.1080][7.1501:1656](),[7.2076][7.1501:1656](),[7.1501][7.1501:1656](),[7.1656][2.21:44](),[2.44][7.1834:2087](),[7.1834][7.1834:2087]()
    * clone this repo to a new client app, clear its save dir, run it, run the
    driver, define `on.initialize` with a run-time error:
    ```
    on.initialize = function()
    foo = bar+1
    end
    ```
    Hit F4.
    Quit the client app and restart. App shows an error.
    Hit F4 again in the driver (without fixing the error).
    The client app continues to show the error.
    Driver can connect to app on errors in `on.quit` (and `on.save_settings`).
    * clone this repo to a new client app, clear its save dir, run it, run the
    driver, define `on.quit` with a run-time error:
    ```
    on.quit = function()
    foo = bar+1
    end
    ```
    Hit F4.
    Try to quit the client app. It shows an error and refuses to quit.
    Edit `on.quit` in the driver and remove the error:
    ```
    on.quit = function()
    end
    ```
    Hit F4. The error disappears from the app and driver.
    Try to quit the client app. Now the quit succeeds.
    * clone this repo to a new client app, clear its save dir, run it, run the
    driver, define `on.quit` with a run-time error:
    ```
    on.quit = function()
    foo = bar+1
    end
    ```
    Hit F4.
    Try to quit the client app. It shows an error and refuses to quit.
    Hit F4 again in the driver (without fixing the error).
    Try to quit the client app again. It continues to show the error.
    Driver can connect to app that contains test failures on startup.
    * clone this repo to a new client app, clear its save dir, run it, run the
    driver, define a new test with an invalid assertion:
    ```
    test_foo = function()
    check(nil, 'foo')
    end
    ```
    Hit F4. The test fails.
    Quit the client app and restart. App shows an error.
    Edit `test_foo` in the driver and remove the error:
    ```
    test_foo = function()
    end
    ```
    Hit F4. The error disappears from the app and driver.
    * clone this repo to a new client app, clear its save dir, run it, run the
    driver, define a new test with an invalid assertion:
    ```
    test_foo = function()
    check(nil, 'foo')
    end
    ```
    Hit F4.
    Quit the client app and restart. App shows an error.
    Hit F4 again in the driver (without fixing the error).
    The client app continues to show the error.
    * clone this repo to a new client app, clear its save dir, run it, run the
    driver, add a definition containing invalid Lua:
    ```
    on.draw = function(
    ```
    Hit F4. Driver shows an error under the definition as before.
    Quit the client app.
    Switch back to the driver. Hit F4. The driver hangs and needs to be
    force-quit. [This is not ideal, but how things are today.]
    [1] We never clear the app from the driver's config. driver.love needs to be
    robust to apps changing out from under it.