Commit Graph

271 Commits

Author SHA1 Message Date
ISSOtm
fa10ee4356 Deprecate colon-less non-local labels 2020-02-29 16:30:47 +01:00
Eldred Habert
361d6cf517 Merge pull request #437 from rednex/locals
Prevent local symbols that are not labels
2020-02-26 02:56:35 +01:00
ISSOtm
4cc24f4369 Add ds cnt, byte syntax
As suggested by https://github.com/rednex/rgbds/issues/350#issuecomment-498030458
The order `count` then `byte` was decided after some discussion:
- First argument consistent with single-arg syntax
- Intuitive at least to some people other than myself
- Consistent with other assemblers, at least ca65
2020-02-23 22:43:50 +01:00
ISSOtm
76efd26da0 Prevent local symbols that are not labels
Fixes errors brought up in #423
2020-02-19 00:20:58 +01:00
ISSOtm
e941cafedb Make locals in main scope a non-fatal error 2020-02-18 20:07:44 +01:00
ISSOtm
03fe077b41 Make locals without parent a non-fatal error 2020-02-18 20:07:44 +01:00
ISSOtm
30a95d735a Improve testing PC 2020-02-13 20:20:35 +01:00
ISSOtm
31aa1ea474 Improve arg-shift test
New test case courtesy of @aaaaaa123456789
2020-02-11 11:38:57 +01:00
ISSOtm
001b95d12a Add SHIFT with numeric argument
Fixes #442.
2020-02-11 11:25:38 +01:00
ISSOtm
02ea52f453 Add test for LOAD 2020-02-10 03:39:09 +01:00
ISSOtm
8c4b473d6f Add more checks to section creation in RGBASM
Fixes rednex#471, but also backports a couple more checks from RGBLINK
2020-02-10 03:35:55 +01:00
ISSOtm
1d70c989be Test one more label diff case 2020-02-10 02:55:51 +01:00
ISSOtm
818a0d0296 Test more cases in label-diff test 2020-02-10 02:51:48 +01:00
ISSOtm
4e8b34f42e Improve error message when a symbol is not constant 2020-02-10 02:51:48 +01:00
ISSOtm
1d78cd0f03 Axe the constexpr expression evaluator
This avoids redundancy between them (and also having to port fixes and features)
The error messages have been preserved through a string reporting mechanism
2020-02-10 02:51:48 +01:00
ISSOtm
299574221e Truncate shift.out.bin
Too large a size makes diff output (when tests fail) annoying
2020-02-09 19:51:47 +01:00
ISSOtm
579a324ce7 Fix diffing bin files in RGBASM tests 2020-02-09 13:58:47 +01:00
ISSOtm
ee34200e5f Output diffs when binary tests fail 2020-02-06 15:36:15 +01:00
ISSOtm
b1cd730db2 Add link-time RST instruction
This allows using a label as the argument to a `rst` instruction
Fixes rednex#448
2020-02-03 21:07:12 +01:00
Eldred Habert
ac6232bc87 Merge pull request #473 from ISSOtm/shift_ub
Remove undefined behavior from shifts
2020-02-03 03:49:38 +01:00
ISSOtm
44cdcd12c3 Use tput for formatting escape sequences 2020-01-28 21:04:41 +01:00
ISSOtm
b11d121c48 Remove undefined behavior from shifts
`asl` and `asr` in `src/link/patch.c` courtesy of @pinobatch, and rearranged in RGBASM
evaluators.
2020-01-28 12:37:38 +01:00
ISSOtm
cdf6000618 Report failing file names in comparisons
The files being diffed (especially for  variants) are temp files, so their
names are pretty nondescript. This improve error output, using ANSI escape
sequences to make those lines stand out.
2020-01-28 11:44:50 +01:00
ISSOtm
1bd41bf79a Don't use diff to compare bin files in tests 2020-01-26 21:10:31 +01:00
ISSOtm
cd107855e7 Test new working label subtractions 2020-01-24 03:03:18 +01:00
ISSOtm
ab9307ac61 Clean up symbol management
Stop using that bitfield for everything, including what can be determined otherwise
It also makes it easier to have a sane state, since some bits were (supposedly)
mutually exclusive
2020-01-24 02:51:48 +01:00
ISSOtm
e3ef194b4f Remove local label error checking
This is actually not necessary, because RGBLINK would warn about missing labels.
Besides, through semi-esoteric ways, it is possible to define more labels in this scope,
and there's no reason to prevent that.
2020-01-24 02:51:48 +01:00
ISSOtm
51d5ff0567 Test subtracting labels 2020-01-24 02:50:24 +01:00
ISSOtm
56d5f1588a Do not run .pipe tests if the normal variant fails
They'll most likely fail as well, just adding redundant error output
2020-01-21 00:27:28 +01:00
ISSOtm
89917ef688 Put semicolons before labels in test suite 2020-01-16 22:09:31 +01:00
ISSOtm
95cd0c6e53 Add test for BANK() in constant context 2020-01-12 13:09:27 +01:00
ISSOtm
23ab245cec Return a consistent number for const BANK() when erroring out 2020-01-12 13:07:48 +01:00
ISSOtm
f1f70d250a Add test for DEF(@) 2020-01-09 06:10:28 +01:00
ISSOtm
8a90d74340 Ignore line endings in test suite
This removes many false positives with Windows
2020-01-09 01:10:51 +01:00
ISSOtm
5a06fad31e Separate stdout and stderr in tests
POSIX leaves undefined the order of output if stderr is injected into stdout,
and in practice it differs on Windows (Linux buffers both streams separately,
Windows interleaves them as they arrive without buffering).
This should help testing on other platforms
2020-01-09 01:10:51 +01:00
Eldred Habert
676800476d Merge pull request #430 from ISSOtm/known_selfbank
Make `BANK(@)` and `BANK("section")` known to RGBASM
2020-01-08 18:56:28 +01:00
ISSOtm
8a1e920e23 Fix incorrect line counting when running REPT blocks.
Fixes #461
2019-12-12 23:46:16 +01:00
ISSOtm
d23401316e Improve pc-bank test 2019-12-07 23:44:00 +01:00
ISSOtm
e4f4706508 Add tests for new "known self-bank" 2019-12-07 22:15:07 +01:00
ISSOtm
b1d4be66e4 Remove deprecated "section charmap" feature 2019-12-04 01:56:06 +01:00
ISSOtm
191ee4ba1f Add support for toggleable warnings 2019-11-18 20:45:21 +01:00
ISSOtm
122f5fe12e Prevent creating labels outside of sections
This doesn't make sense, and causes RGBLINK to misbehave
2019-11-04 08:35:00 +01:00
Eldred Habert
192f2de704 Merge pull request #440 from ISSOtm/nested_brackets
Allow nested bracketed symbols
2019-11-03 16:40:34 +01:00
ISSOtm
cdd8200936 Add test for nested brackets 2019-10-10 15:00:59 +02:00
ISSOtm
d76f994318 Run tests under a specific locale
Fixes #427
2019-10-10 13:23:36 +02:00
Eldred Habert
e93d65d736 Merge pull request #425 from ISSOtm/eexpansion_error
Add info about string expansions in error reports
2019-10-03 10:20:49 +02:00
ISSOtm
dab5f59ed9 Fix location of all relevant SECTIONs in tests
If section placement is changed such that those are no longer guaranteed to be
placed at zero, tests would break when they shouldn't.
2019-09-23 01:28:48 +02:00
Eldred Habert
22a6a82642 Merge pull request #419 from dbrotz/fix-blackslash-tab-at-eof
Handle tabs after backslash at end of file
2019-09-23 00:05:21 +02:00
ISSOtm
55fbecee49 Add info about string expansions in error reports
This is especially useful when an EQUS expands to another one, to help
track them.
This is done separately from the file stack as the EQUS stack is separate
(which is itself because EQUS are managed *way* differently).
2019-09-12 10:02:24 +02:00
dbrotz
f36a3d5b2a Fix macro and rept buffer overflows
Macro and rept buffers were not always being terminated with newlines
and/or were vulnerable to the final newline being escaped, allowing
buffer overflows to occur. Now, they are terminated with newlines using
the same mechanism as the file buffer.
2019-09-10 03:03:04 -07:00