mirror of
https://github.com/on4kjm/FLEcli.git
synced 2025-01-30 22:41:04 +01:00
Some Cleaning
This commit is contained in:
parent
8443c27b18
commit
ec6cb27812
3 changed files with 27 additions and 5 deletions
|
@ -13,21 +13,41 @@ func TestValidateWwff(t *testing.T) {
|
|||
wantErrorMsg string
|
||||
}{
|
||||
{
|
||||
"Good call (simple)",
|
||||
"Good ref (simple)",
|
||||
args{ inputStr: "onff-0258", },
|
||||
"ONFF-0258", "",
|
||||
},
|
||||
{
|
||||
"Good call (simple)",
|
||||
"Good ref (single digit country)",
|
||||
args{ inputStr: "fff-0258", },
|
||||
"FFF-0258", "",
|
||||
},
|
||||
{
|
||||
"Good call (simple)",
|
||||
"Good ref (Numerical country)",
|
||||
args{ inputStr: "4xff-0258", },
|
||||
"4XFF-0258", "",
|
||||
},
|
||||
//TODO: add the invalid cases
|
||||
{
|
||||
"Bad ref (no country prefix)",
|
||||
args{ inputStr: "ff-0258", },
|
||||
"*FF-0258", "Invalid WWFF reference",
|
||||
},
|
||||
{
|
||||
"Bad ref (wrong separator)",
|
||||
args{ inputStr: "gff/0258", },
|
||||
"*GFF/0258", "Invalid WWFF reference",
|
||||
},
|
||||
{
|
||||
"Bad ref (reference too short)",
|
||||
args{ inputStr: "onff-258", },
|
||||
"*ONFF-258", "Invalid WWFF reference",
|
||||
},
|
||||
{
|
||||
"Bad ref (no country prefix)",
|
||||
args{ inputStr: "onff-02589", },
|
||||
"*ONFF-02589", "Invalid WWFF reference",
|
||||
},
|
||||
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# Commands for testing
|
||||
|
||||
* `./FLEcli -i test/data/fle-1.txt load`
|
||||
* `./FLEcli -i test/sample_contest_ru.txt load`
|
||||
* `./FLEcli -i test/sample_contest_ru.txt load`
|
||||
* `go test ./...` runs the unit tests
|
|
@ -2,6 +2,7 @@
|
|||
mycall on4kjm/p
|
||||
operator on4kjm
|
||||
nickname Portable
|
||||
QslMsg This is a QSL message
|
||||
|
||||
# Log
|
||||
date 2020-05-23
|
||||
|
|
Loading…
Reference in a new issue