~sircmpwn/hare-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH hare] hare::lex: use raw strings in string tests

Details
Message ID
<20220514033458.22977-1-sebastian@sebsite.pw>
DKIM signature
pass
Download raw message
Patch: +3 -4
Signed-off-by: Sebastian <sebastian@sebsite.pw>
---
 hare/lex/+test.ha | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hare/lex/+test.ha b/hare/lex/+test.ha
index 6eec246b..65348fb2 100644
--- a/hare/lex/+test.ha
+++ b/hare/lex/+test.ha
@@ -238,19 +238,18 @@ fn loc(line: uint, col: uint) location = location {
};

@test fn strings() void = {
	const in = "\"a\" \"b\" \"\\a\" \"\\b\" \"\\f\" \"\\n\" \"\\r\" "
		"\"\\t\" \"\\v\" \"\\0\" \"\\\\\" \"\\\'\"";
	const in = `"a" "b" "\a" "\b" "\f" "\n" "\r" "\t" "\v" "\0" "\\" "\'"`;
	const expected: [_]token = [
		(ltok::LIT_STR, "ab\a\b\f\n\r\t\v\0\\\'", loc(1, 1)),
	];
	// TODO: test \x and \u and \U
	lextest(in, expected);
	const in = "\"ab\\a\\b\\f\\n\\r\\t\\v\\0\\\\\\'\"";
	const in = `"ab\a\b\f\n\r\t\v\0\\\'"`;
	const expected: [_]token = [
		(ltok::LIT_STR, "ab\a\b\f\n\r\t\v\0\\\'", loc(1, 1)),
	];
	lextest(in, expected);
	const in = "\"hello world\", \"こんにちは\", \"return\", \"foo\"";
	const in = `"hello world", "こんにちは", "return", "foo"`;
	const expected: [_]token = [
		(ltok::LIT_STR, "hello world", loc(1, 1)),
		(ltok::COMMA, void, loc(1, 14)),
-- 
2.35.1

[hare/patches] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CJZ64DUKCZCU.1294A19ZK5B00@cirno>
In-Reply-To
<20220514033458.22977-1-sebastian@sebsite.pw> (view parent)
DKIM signature
missing
Download raw message
hare/patches: SUCCESS in 1m32s

[hare::lex: use raw strings in string tests][0] from [Sebastian][1]

[0]: https://lists.sr.ht/~sircmpwn/hare-dev/patches/32270
[1]: sebastian@sebsite.pw

✓ #757832 SUCCESS hare/patches/alpine.yml  https://builds.sr.ht/~sircmpwn/job/757832
✓ #757833 SUCCESS hare/patches/freebsd.yml https://builds.sr.ht/~sircmpwn/job/757833
Details
Message ID
<CK15JZFO085U.3JTE0NMAJLBPN@taiga>
In-Reply-To
<20220514033458.22977-1-sebastian@sebsite.pw> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
Thanks!

To git@git.sr.ht:~sircmpwn/hare
   1ecd1920..70a2d3ad  master -> master
Reply to thread Export thread (mbox)