Add unit tests for filenames with any of the following: . + - _ . Thanks to @allenhsieh for the initial work on this
The regex has been tested on ~10k files (basically all of 3.10 main and community) and only 4 fail. I'm not going to fix the regex for the four failures as those APKs even fail Alpines own validation of what a "valid" $pkgver is (i.e apk version --check fails). Just for the record the four fails are:
lua-socket-3.0_rc1_git20160306-r2.apk
lua5.1-socket-3.0_rc1_git20160306-r2.apk
lua5.2-socket-3.0_rc1_git20160306-r2.apk
lua5.3-socket-3.0_rc1_git20160306-r2.apk
I'm not a regex expert so happy to take any feedback.
This is an updated fix for the regex issues mentioned in #4 . It has the following changes:
The regex has been tested on ~10k files (basically all of 3.10 main and community) and only 4 fail. I'm not going to fix the regex for the four failures as those APKs even fail Alpines own validation of what a "valid" $pkgver is (i.e apk version --check fails). Just for the record the four fails are:
I'm not a regex expert so happy to take any feedback.
cc @DarthHater @bhamail