marcIhm / yabasic

Yabasic - A simple Basic interpreter for Unix and Windows
http://www.yabasic.de
MIT License
90 stars 17 forks source link

installation failing with Tmux (latest release tar 2.84.1) #34

Closed subject546 closed 5 years ago

subject546 commented 5 years ago

I am using the following archive: http://www.yabasic.de/download/yabasic-2.84.1.tar.gz and the instructions from (Compile the sources for Unix): http://www.yabasic.de/download.html

The tests that are using Tmux (tests/inkey.sh and tests/print-at.sh) to simulate input are failing because my Tmux version (tmux 2.3) is returning different results than expected. If I run the tests manually the windows display the correct values.

My version seems to return the input of Tmux (the text typed inside the Tmux window) instead of the output of the test yab, see the log file: test-suite.log.

There are also some other problems with using Tmux to test this functionality, for one this creates a install dependency on Tmux. And the tests will presumably also fail to work if you echo something in your .bashrc (I can't test this because of Tmux already returning the wrong values)

proposed solution

I understand that these tests are needed to test the full functionality of yabasic but as it fails on parsing of external programs I am of the opinion that the tests should not lead to installation failure. A possible fix is to make these tests optional or non fatal.

The following patch is a "quick and dirty" fix that removes the tests tests/inkey.sh and tests/print-at.sh from the "make check" command.

--- Makefile.am.old 2019-10-03 13:11:44.374049035 +0200
+++ Makefile.am 2019-10-03 13:11:56.622308182 +0200
@@ -6,7 +6,7 @@
 AM_CPPFLAGS = -DUNIX $(X_CFLAGS)
 EXTRA_DIST = runme yabasic.htm yabasic.flex yabasic.bison tests configure.ac LICENSE demo.yab $(man_MANS)
 AUTOMAKE_OPTIONS = check-news subdir-objects
-TESTS = tests/break.yab tests/bugs.yab tests/grammar.yab tests/io.yab tests/long_variable_name.yab tests/simple.yab tests/switch_continue_break.yab tests/switch_for.yab tests/switch_gosub.yab tests/switch_goto.yab tests/switch_return.yab tests/switch_simple.yab tests/switch_subr.yab tests/switch.yab tests/numbers.yab tests/system.yab tests/string.yab tests/silent.sh tests/inkey.sh tests/print-at.sh tests/nested_import.yab
+TESTS = tests/break.yab tests/bugs.yab tests/grammar.yab tests/io.yab tests/long_variable_name.yab tests/simple.yab tests/switch_continue_break.yab tests/switch_for.yab tests/switch_gosub.yab tests/switch_goto.yab tests/switch_return.yab tests/switch_simple.yab tests/switch_subr.yab tests/switch.yab tests/numbers.yab tests/system.yab tests/string.yab tests/silent.sh tests/nested_import.yab

 # flags for flex (-d for debugging)
 flexflags = -i -I -L -s
marcIhm commented 5 years ago

Basically yabasic should not require tmux for its tests as it is not commonly installed. However some things can only be tested with tmux. As a compromise, thos tests are no longer run during make test; only the Rakefile still runs them; therefore they are executed regularly on my machine (and thus avoid regression) but not on the machine of users.