1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-03 06:31:20 +00:00
Commit graph

24 commits

Author SHA1 Message Date
Matthew Kilgore b4d6f52909 Add testsuite of built-in Types 2022-10-01 14:18:53 -04:00
Matthew Kilgore 094a8c82b2 Fix compiling bas files relative to the CWD
Fix was pulled from QB64Official/qb64#17 by Cory Smith, I just added
tests around it.

Most (all?) compilers allow you to run the compiler from a separate
directory than the compiler itself is located in and compile source
files relative to that directory. QB64-PE however does not allow that,
for a variety of reasons it always search for the provided source file
relative to the location of the QB64-PE compiler rather than the CWD it
was run from. This is pretty unexpected behavior in a lot of cases, and
also doesn't give very helpful error messages either.

This change has us check if the source file exists at the given CWD
location, and if it does we will prepend the CWD to produce the correct
path to the file.

To test that this behavior works as expected I modified
`compile_test.sh` to compile from within the test directories using a
relative path directly to the test file, this fails with current QB64-PE
versions because it can't find the source file.

Additionally, I was unsure of whether this would impact the behavior of
`'$include`, so I added some tests around include that uses various
combinations of paths relative to QB64-PE and relative to the source
file being compiled, and they all find the files as expected so I think
it's fine.
2022-09-30 17:13:43 -04:00
Matthew Kilgore a7cd7884a9 Add CONST tests 2022-09-30 11:23:34 -04:00
Matthew Kilgore c93da8db72 Add tests for SOUND and PLAY "MB"
These tests were intended to be added by #171, but the Linux build was
having problems. The issues with the build have since been resolved so
the tests are getting added back in.

Fixes: #173
2022-09-17 03:06:24 -04:00
Matthew Kilgore 870e67a99b Add $CONSOLE:ONLY and libz tests
libz tests were missing, I added one to test the libz dependency.

Additionally $CONSOLE:ONLY creates many weird interactions and is
currently broken in some cases. This adds tests for all the dependencies
that can work with $CONSOLE:ONLY to verify that they compile correctly.
2022-09-17 03:06:24 -04:00
Matthew Kilgore cebcb11646 Fix compiling source files with single quotes in name
Using single quotes in a file name wasn't working because the Makefile
was using single quotes itself to quote the filename when providing it
to the compiler. The Makefile was switched to use double quotes instead,
which work just as well but are allowed to contain single quotes inside
of them.

Since double quotes are a legal character to have in a file name on
Linux and Mac OS, I added extra logic to start escaping double quote
characters.

I added a test to verify that we can compile source files with single
quotes in the name. I could not add a test for double quotes since such
files cannot exist on Windows and thsu cannot easily be added to the
repository.
2022-09-09 09:59:43 -04:00
Matthew Kilgore dcc181244c Add test of MIDI unsupported with OpenAL 2022-09-04 23:35:14 -04:00
Matthew Kilgore 2b3403745c Add initial MIDI language support
This adds MIDI support to the language as a new unstable feature. There
are two new metacommands that come with this:

$Unstable: Midi
$MidiSoundFont: [Default|"filename"]

The $Unstable command is required to be able to use any of the other
commands, and just signifies that this is not a full part of the
language yet and may change in breaking ways before the API is
finalized.

The $MidiSoundFont command enables MIDI support in the compiled program,
and also specifies what sound font to use to play MIDI files. "Default"
will make use of the soundfont placed at
'./internal/support/default_soundfont.sf2', and otherwise a filename can
be specified to use any soundfont wanted.

In either case, the selected sound font is compiled into the executable
and then loaded at runtime.

Fixes: #115
2022-09-04 23:35:14 -04:00
Samuel Gomes 4d4692314e Update rotation test to include more cases 2022-09-02 10:15:07 +05:30
Samuel Gomes adf838cd81 Update _ROL & _ROR test and output 2022-09-01 18:09:47 +05:30
Samuel Gomes a7a4d837ea Added test for _ROL & _ROR 2022-09-01 17:28:12 +05:30
Roland Heyder face2c883f Step 3: Update test cases
Replaced and renamed icon files, adjusted references in the test.bas files.
2022-08-10 00:51:12 +02:00
github-actions[bot] 72d801e0cd Fix linking static libraries on Windows
In QB64, when linking with an external static library `nm.exe` is used
to determine whether the symbol being used is either a C or C++ symbol,
which determines how the function should be declared in the C++ code.

Unfortunately on Windows the `SHELL` command for `nm.exe` is missing the
`cmd /c`, which means the redirection does not work and consequently
we're unable to find the function declaration via `nm.exe`, which causes
the compilation to fail.

In addition to fixing this, I added tests for `DECLARE STATIC LIBRARY`
for all supported platforms.

Fixes: #112
2022-07-09 14:59:33 -04:00
Matthew Kilgore e250753334 Disable deviceinput test on Linux 2022-06-09 21:30:37 -04:00
Matthew Kilgore 62ec4ebdbd Fix compilation with DEP_DEVICEINPUT
The Makefile changes broke compiling with device input support. This got
missed because no test case for DEP_DEVICEINPUT got added.

Fixes: #100
2022-06-09 21:30:37 -04:00
Matthew Kilgore 930b36a7ae Add missing test for directory with spaces 2022-05-24 00:00:37 -04:00
Matthew Kilgore cf807de366 Add test of DATA linking 2022-05-12 00:21:02 -04:00
Matthew Kilgore 64d32616ea Audio tests cannot be run on Linux
The GitHub runners do not have any sound cards available. We could
potentially install a dummy one but that's a bit too much work right
now.
2022-05-12 00:21:02 -04:00
Matthew Kilgore 23ef0aeca8 Add more tests and dynamic library support 2022-05-12 00:21:02 -04:00
Matthew Kilgore 0fa4fc15ea Fix test 2022-05-12 00:21:02 -04:00
Matthew Kilgore 2d1e4ec761 Add a few more VERSIONINFO tests 2022-05-06 14:29:37 -04:00
Matthew Kilgore 18c4fc5e5e Add test of relative icon path 2022-05-06 13:42:35 -04:00
Matthew Kilgore 3acf3759da Add compile test for combined VERSIONINFO and EXEICON 2022-05-06 13:42:35 -04:00
Matthew Kilgore b89e388c2f Add Compilation tests for different dependencies
These tests check that we can compile programs that use a variety of
different sets of dependencies. Each program will only be compiled with
the set of dependencies it relies on.
2022-04-28 23:00:06 -04:00