mirror of
https://github.com/tnodir/fort
synced 2024-11-15 14:35:10 +00:00
UI: Zones: Improve IPv4 address regexp.
This commit is contained in:
parent
377ac86778
commit
10e3a9d13e
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QSignalSpy>
|
||||
|
||||
#include <googletest.h>
|
||||
@ -83,7 +84,7 @@ TEST_F(NetUtilTest, taskTasix)
|
||||
tasix.setZoneId(1);
|
||||
tasix.setSort(true);
|
||||
tasix.setEmptyNetMask(24);
|
||||
tasix.setPattern("^\\*\\D{2,5}(\\S+)");
|
||||
tasix.setPattern("^\\*\\D{2,5}([\\d./-]{7,})");
|
||||
|
||||
QString textChecksum;
|
||||
const auto text = QString::fromLatin1(buf);
|
||||
@ -97,5 +98,7 @@ TEST_F(NetUtilTest, taskTasix)
|
||||
tasix.setCachePath(cachePath);
|
||||
ASSERT_TRUE(tasix.storeAddresses(list));
|
||||
|
||||
ASSERT_TRUE(tasix.saveAddressesAsText(cachePath + "tasix-mrlg.txt"));
|
||||
const QFileInfo out(cachePath + "tasix-mrlg.txt");
|
||||
ASSERT_TRUE(tasix.saveAddressesAsText(out.filePath()));
|
||||
ASSERT_GT(out.size(), 0);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
"title": "Generic",
|
||||
"description": "Generic list",
|
||||
"sort": true,
|
||||
"pattern": "^\\D*(\\S{7,})",
|
||||
"pattern": "^\\D*([\\d./-]{7,})",
|
||||
"emptyNetMask": 32
|
||||
},
|
||||
{
|
||||
@ -12,7 +12,7 @@
|
||||
"title": "BGP",
|
||||
"description": "BGP table",
|
||||
"sort": true,
|
||||
"pattern": "^\\*\\D{2,5}(\\S{7,})",
|
||||
"pattern": "^\\*\\D{2,5}([\\d./-]{7,})",
|
||||
"emptyNetMask": 24
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user