https://github.com/Olivine-Labs/luassert/blob/36fc3af9621696a9dfcf71c0bcd25cdbc9475cf8/src/util.lua#L322-L329
At line 328, the longkey maybe wrong in further iterations.
For example: if the tokens is {'is', 'match', 'error'}, the longkey variable will be match_match_error at the second iteration in the inner while loop. So it may fail to get the longest matching key when the key has three or more words.
Here is the potential fix which I brought up:
- longkey = (token .. '_' .. key)
+ longkey = i > 1 and (tokens[i-1] .. '_' .. key) or key