mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
If you add t.Logf("%+v %+v", actual, testCase.expectedErrors) to the test code, you'll notice that only Errors' Messages are being compared: --- PASS: Test_ValidURLValidation/Invalid_schema (0.00s) binding_test.go:43: [Url] [Url] FieldNames and Classification are ignored in comparison. Moreover, an Errors slice with a single Error with empty message is formatted as '[]' (the same as empty slice), which is also error-prone. I discovered this when working on #7791 when one test which was not supposed to pass did pass. https://play.golang.org/p/qC4wVLrm4NG This commit changes the test to do the comparison properly. |
6 years ago | |
---|---|---|
.. | ||
auth | 6 years ago | |
avatar | 6 years ago | |
base | 6 years ago | |
cache | 6 years ago | |
context | 6 years ago | |
cron | 6 years ago | |
generate | 6 years ago | |
git | 6 years ago | |
gzip | 6 years ago | |
highlight | 6 years ago | |
httplib | 6 years ago | |
indexer | 6 years ago | |
lfs | 6 years ago | |
log | 6 years ago | |
mailer | 6 years ago | |
markup | 6 years ago | |
metrics | 6 years ago | |
migrations | 6 years ago | |
minwinsvc | 8 years ago | |
notification | 6 years ago | |
options | 6 years ago | |
pprof | 6 years ago | |
private | 6 years ago | |
process | 7 years ago | |
public | 6 years ago | |
pull | 6 years ago | |
recaptcha | 6 years ago | |
repofiles | 6 years ago | |
search | 7 years ago | |
secret | 6 years ago | |
session | 6 years ago | |
setting | 6 years ago | |
ssh | 6 years ago | |
structs | 6 years ago | |
sync | 8 years ago | |
templates | 6 years ago | |
test | 6 years ago | |
upload | 6 years ago | |
user | 6 years ago | |
util | 6 years ago | |
validation | 6 years ago |