ref: f196ea0ea5f82cb63e4bb66f2009d8115de386a9
parent: 2d00e8f657965583e906327bd4c0eff6953a71cd
author: Ori Bernstein <ori@markovcorp.com>
date: Tue Nov 14 08:51:26 EST 2017
Fix build to deal with removal of streq function.
--- a/lib/http/parse.myr
+++ b/lib/http/parse.myr
@@ -14,8 +14,8 @@
var ca, cb
while a.len == 0 || b.len == 0
- (ca, a) = std.strstep(a)
- (cb, b) = std.strstep(b)
+ (ca, a) = std.charstep(a)
+ (cb, b) = std.charstep(b)
if std.tolower(ca) != std.tolower(cb)
-> false
;;
--- a/lib/std/test/utf.myr
+++ b/lib/std/test/utf.myr
@@ -34,31 +34,31 @@
var sub, rest
(sub, rest) = std.graphemestep(s)
- std.assert(std.streq(sub, "̀"), "didn't get U+0300 as next grapheme")
+ std.assert(std.eq(sub, "̀"), "didn't get U+0300 as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "a"), "didn't get \"a\" as next grapheme")
+ std.assert(std.eq(sub, "a"), "didn't get \"a\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "史"), "didn't get \"史\" as next grapheme")
+ std.assert(std.eq(sub, "史"), "didn't get \"史\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "c"), "didn't get \"c\" as next grapheme")
+ std.assert(std.eq(sub, "c"), "didn't get \"c\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "\t"), "didn't get \"\\t\" as next grapheme")
+ std.assert(std.eq(sub, "\t"), "didn't get \"\\t\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "Я"), "didn't get \"Я\" as next grapheme")
+ std.assert(std.eq(sub, "Я"), "didn't get \"Я\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "x̀̀̀̀̀"), "didn't get \"x̀̀̀̀̀\" as next grapheme")
+ std.assert(std.eq(sub, "x̀̀̀̀̀"), "didn't get \"x̀̀̀̀̀\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "\n"), "didn't get \"\\n\" as next grapheme")
+ std.assert(std.eq(sub, "\n"), "didn't get \"\\n\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "z̉"), "didn't get \"z̉\" as next grapheme")
+ std.assert(std.eq(sub, "z̉"), "didn't get \"z̉\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
std.assert(sub.len == 0, "didn't get \"\" as last grapheme")
@@ -68,22 +68,22 @@
s = "\tc̸̶̡̡̗̣͕̪͖ͯ͑̈̄̿͊ͣ̈́͝ḧ̵̸̛̥͚̭̣͈͖̼͈͓͓̫͍́̓ͪͫ̋͘͡a̢̩̱̠̘̹̤̯͚̦̰̼̯̲̞͆͂̿ͬ̂͋͒̈ͅͅo̷̷̶̥͖̼̮̳̗͚ͦ̉̆̅̃̍ͤ̆͑ͣ̽́̚s̓̍̍̄͏̖̞̟̱́͡͡͝"
(sub, rest) = std.graphemestep(s)
- std.assert(std.streq(sub, "\t"), "didn't get \"\\t\" as next grapheme")
+ std.assert(std.eq(sub, "\t"), "didn't get \"\\t\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "c̸̶̡̡̗̣͕̪͖ͯ͑̈̄̿͊ͣ̈́͝"), "didn't get \"c̸̶̡̡̗̣͕̪͖ͯ͑̈̄̿͊ͣ̈́͝\" as next grapheme")
+ std.assert(std.eq(sub, "c̸̶̡̡̗̣͕̪͖ͯ͑̈̄̿͊ͣ̈́͝"), "didn't get \"c̸̶̡̡̗̣͕̪͖ͯ͑̈̄̿͊ͣ̈́͝\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "ḧ̵̸̛̥͚̭̣͈͖̼͈͓͓̫͍́̓ͪͫ̋͘͡"), "didn't get \"ḧ̵̸̛̥͚̭̣͈͖̼͈͓͓̫͍́̓ͪͫ̋͘͡\" as next grapheme, it was {}", rest)
+ std.assert(std.eq(sub, "ḧ̵̸̛̥͚̭̣͈͖̼͈͓͓̫͍́̓ͪͫ̋͘͡"), "didn't get \"ḧ̵̸̛̥͚̭̣͈͖̼͈͓͓̫͍́̓ͪͫ̋͘͡\" as next grapheme, it was {}", rest)
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "a̢̩̱̠̘̹̤̯͚̦̰̼̯̲̞͆͂̿ͬ̂͋͒̈ͅͅ"), "didn't get \"a̢̩̱̠̘̹̤̯͚̦̰̼̯̲̞͆͂̿ͬ̂͋͒̈ͅͅ\" as next grapheme")
+ std.assert(std.eq(sub, "a̢̩̱̠̘̹̤̯͚̦̰̼̯̲̞͆͂̿ͬ̂͋͒̈ͅͅ"), "didn't get \"a̢̩̱̠̘̹̤̯͚̦̰̼̯̲̞͆͂̿ͬ̂͋͒̈ͅͅ\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "o̷̷̶̥͖̼̮̳̗͚ͦ̉̆̅̃̍ͤ̆͑ͣ̽́̚"), "didn't get \"o̷̷̶̥͖̼̮̳̗͚ͦ̉̆̅̃̍ͤ̆͑ͣ̽́̚\" as next grapheme")
+ std.assert(std.eq(sub, "o̷̷̶̥͖̼̮̳̗͚ͦ̉̆̅̃̍ͤ̆͑ͣ̽́̚"), "didn't get \"o̷̷̶̥͖̼̮̳̗͚ͦ̉̆̅̃̍ͤ̆͑ͣ̽́̚\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "s̓̍̍̄͏̖̞̟̱́͡͡͝"), "didn't get \"s̓̍̍̄͏̖̞̟̱́͡͡͝\" as next grapheme")
+ std.assert(std.eq(sub, "s̓̍̍̄͏̖̞̟̱́͡͡͝"), "didn't get \"s̓̍̍̄͏̖̞̟̱́͡͡͝\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
std.assert(sub.len == 0, "didn't get \"\" as last grapheme")
@@ -93,21 +93,21 @@
(0xFF : byte), (0x92 : byte), ('c' : byte) ][:]
(sub, rest) = std.graphemestep(s)
- std.assert(std.streq(sub, "A"), "didn't get \"A\" as next grapheme")
+ std.assert(std.eq(sub, "A"), "didn't get \"A\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "b"), "didn't get \"b\" as next grapheme")
+ std.assert(std.eq(sub, "b"), "didn't get \"b\" as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, [ (0xFE : byte) ][:]), "didn't get 0xEE, len={} as next grapheme", sub.len)
+ std.assert(std.eq(sub, [ (0xFE : byte) ][:]), "didn't get 0xEE, len={} as next grapheme", sub.len)
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, [ (0xFF : byte) ][:]), "didn't get 0xEA as next grapheme")
+ std.assert(std.eq(sub, [ (0xFF : byte) ][:]), "didn't get 0xEA as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, [ (0x92 : byte) ][:]), "didn't get 0xEF as next grapheme")
+ std.assert(std.eq(sub, [ (0x92 : byte) ][:]), "didn't get 0xEF as next grapheme")
(sub, rest) = std.graphemestep(rest)
- std.assert(std.streq(sub, "c"), "didn't get \"c\" as next grapheme")
+ std.assert(std.eq(sub, "c"), "didn't get \"c\" as next grapheme")
}