-
-
Save Et7f3/c36059408ffb2f648618e798b54d1d6f to your computer and use it in GitHub Desktop.
esy_lock unit tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def esy_lock(name, bool) | |
puts (!!name.match(/(^|\/)(\w+\.)?esy.lock$/) == bool) | |
end | |
esy_lock("esy.lock", true) | |
esy_lock(".esy.lock", false) | |
esy_lock("h.esy.lock", true) | |
esy_lock("esy.lock", true) | |
esy_lock("/esy.lock", true) | |
esy_lock("/.esy.lock", false) | |
esy_lock("/h.esy.lock", true) | |
esy_lock("/esy.lock", true) | |
esy_lock("/one/path/esy.lock", true) | |
esy_lock("/one/path/.esy.lock", false) | |
esy_lock("/one/path/h.esy.lock", true) | |
esy_lock("/one/path/esy.lock", true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment