Commit graph

21 commits

Author SHA1 Message Date
Christian Schnell
92ba111d92 refactored V86.wait_until_vga_screen_contains()
- reduced clutter and made control flow more comprehensible
- moved initial delay of 100ms to expect(), needed for keyboard buffer "cooldown" in between commands
2025-08-23 10:14:32 -06:00
Christian Schnell
47fb4e1dd2 final cleanup and alignments with the V86 codebase
- changed return value of V86.wait_until_vga_screen_contains() to boolean with true:success and false:timeout
- removed "throw" and "finally" statements in V86.wait_until_vga_screen_contains()
- removed "finally" statements in exec_test() to simplify cleanup code
- removed "export" statements (forgotten leftovers from a silly experiment)
- simplified parsing of options.timeout_msec in V86.wait_until_vga_screen_contains()
- changed line-matching function to string.startsWith()
- switched from Element.innerHTML to Element.textContent in html assignments
- relaxed rules for handling of command in expected[] in expect()
- removed unused argument "fdc" from FloppyDrive constructor
- renamed variable "tm_end" to "end"
2025-08-23 10:14:32 -06:00
Christian Schnell
e16ce249fe replaced use of RegExp.escape() with own function
RegExp.escape() is available since the May 2025 Baseline which is not yet supported at github CI, replaced with a helper function.
2025-08-23 10:14:32 -06:00
Christian Schnell
00203987f4 moved text matching code from expect() to V86.wait_until_vga_screen_contains()
All changes to V86.wait_until_vga_screen_contains() are backward compatible.
2025-08-23 10:14:32 -06:00
Christian Schnell
b91afaa821 moved FreeDOS boot floppy tests to tests/full/run.js
Moved tests using optional image files

    /images/freedos-fds/freedos.boot.disk.160K.img
    /images/freedos-fds/freedos.boot.disk.180K.img
    /images/freedos-fds/freedos.boot.disk.320K.img
    /images/freedos-fds/freedos.boot.disk.360K.img
    /images/freedos-fds/freedos.boot.disk.640K.img
    /images/freedos-fds/freedos.boot.disk.1200K.img

from tests/api/floppy.js to tests/full/run.js.

Dropped redundant 720K and 1440K FreeDOS boot floppies, these formats are already covered in tests/full/run.js.
2025-08-23 10:14:32 -06:00
Christian Schnell
26ae4dc019 removed Space Invaders boot test, already covered in tests/full/run.js 2025-08-23 10:14:32 -06:00
Christian Schnell
200219335b deactivated Space Invaders test until image file is available on github
Maybe I'm assuming the wrong file name "images/asm-space-invaders.img"?
2025-08-23 10:14:32 -06:00
Christian Schnell
e8235c5f3e added custom floppy size test using Space Invaders (~2K) 2025-08-23 10:14:32 -06:00
Christian Schnell
d7e9c64975 minor optimization 2025-08-23 10:14:32 -06:00
Christian Schnell
51998355ed reduced usage of string.endsWith() in expect() to minimum
If the command string passed to expect() is non-empty it is also used as the first expected response line, but it must be matched against the screen line using .endsWith() because any text preceding the command (usually the shell prompt) is unknown. All other response lines must now match exactly their respective screen lines.
2025-08-23 10:14:32 -06:00
Christian Schnell
0a3a406f69 fixed minor issues
- added log message for missing FreeDOS boot image files
- simplified array construction using spread (...) syntax
- removed deprecated comment about linux test failure
2025-08-23 10:14:32 -06:00
Christian Schnell
f2d8ee7334 attempt to fix the linux-test bug at github CI 2025-08-23 10:14:32 -06:00
Christian Schnell
30cd26ca58 fixed missing awaits within V86.set_fda() and V86.set_fdb()
Async methods V86.set_fda/set_fdb() were not awaiting URL-based file downloads.

This fixed a bug in the state snapshot tests, removed now uneeded call to pause(1000) after loading the image URL.
2025-08-23 10:14:32 -06:00
Christian Schnell
4a22c44bce fixed async calls to V86.set_fda() and V86.set_fdb() 2025-08-23 10:14:32 -06:00
Christian Schnell
8b13c70470 disabled Linux format command test 2025-08-23 10:14:32 -06:00
Christian Schnell
0541e3bc9b added pause command to Linux format test 2025-08-23 10:14:32 -06:00
Christian Schnell
57fb799328 added two floppy format tests, general improvements and cleanup
- added floppy format test to MS-DOS and Linux tests
- added RegExp support to expect() and support to capture its command output
- improved emulator setup and teardown
- removed most of the calls to pause()
- activated FreeDOS boot floppy tests, but conditional (they depend on image file existence on the test host)
- improved documentation of expect() function
- removed unused test with TinyCore 4.7.7, using TinyCore 11 instead
2025-08-23 10:14:32 -06:00
Christian Schnell
b909cfe802 added tests for 8 FreeDOS boot disks of different sizes 2025-08-23 10:14:32 -06:00
Christian Schnell
fc1b204d50 moved Linux test from Core-4.7.7.iso to TinyCore-11.0.iso 2025-08-23 10:14:32 -06:00
Christian Schnell
6f891de57d added two more floppy tests
- added fda state snapshot test by using delayed keyboard input for MS-DOS 6.22 (10ms inter-character delay)
- added fda floppy test using Core 4.7.7 Linux
2025-08-23 10:14:32 -06:00
Christian Schnell
5d94c6bf7b added two floppy drive tests
- renamed floppy-insert-eject.js to floppy.js
- merged and reactivated test from floppy-insert-eject.js
- added fdb test using hda guest MSDOS-6.22
2025-08-23 10:14:32 -06:00