mv all the tests files to the ./sample
This commit is contained in:
parent
c63b1dc5db
commit
04e51e2182
File diff suppressed because it is too large
Load Diff
|
|
@ -117,8 +117,8 @@ Put(36.132.128.0|36.132.147.255|中国|黑龙江省|哈尔滨市|移动|CN): Ok,
|
|||
Batch load modifications from a file using the `put_file` command. The IP segments in the file do not need to be as strict as the data in `./data/ipvx_source.txt`; they do not need to be continuous, and it does not matter if different IP segments overlap. The editor will automatically analyze and process them, for example:
|
||||
|
||||
```bash
|
||||
*editor>> put_file ../../data/ip.test.txt
|
||||
PutFile(../../data/ip.test.txt): Ok, with 25 deletes and 25 additions
|
||||
*editor>> put_file ../../data/sample/ip.test.txt
|
||||
PutFile(../../data/sample/ip.test.txt): Ok, with 25 deletes and 25 additions
|
||||
*editor>>
|
||||
```
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ Save modifications using the `save` command. After saving successfully, you can
|
|||
|
||||
```bash
|
||||
*editor>> save
|
||||
all segments saved to ../../data/ip.merge.txt
|
||||
all segments saved to ../../data/ipv4_source.txt
|
||||
editor>>
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -107,17 +107,17 @@ Put(36.132.128.0|36.132.147.255|中国|黑龙江省|哈尔滨市|移动): Ok, wi
|
|||
*editor>>
|
||||
```
|
||||
|
||||
通过 `put_file` 命令从文件中批量载入修改,文件中的 IP 段不需要像 ./data/ip.merge.txt 中的数据那么严格,不需要前后连续,不同 IP 段有重叠也没关系,编辑器会自动分析处理,例如:
|
||||
通过 `put_file` 命令从文件中批量载入修改,文件中的 IP 段不需要像 ./data/ipvx_source.txt 中的数据那么严格,不需要前后连续,不同 IP 段有重叠也没关系,编辑器会自动分析处理,例如:
|
||||
```bash
|
||||
*editor>> put_file ../../data/ip.test.txt
|
||||
PutFile(../../data/ip.test.txt): Ok, with 25 deletes and 25 additions
|
||||
*editor>> put_file ../../data/sample/ip.test.txt
|
||||
PutFile(../../data/sample/ip.test.txt): Ok, with 25 deletes and 25 additions
|
||||
*editor>>
|
||||
```
|
||||
|
||||
通过 `save` 命令保存修改,保存成功后,再通过上面的命令从修改后的原始 IP 文件重新生成 xdb 即可:
|
||||
```bash
|
||||
*editor>> save
|
||||
all segments saved to ../../data/ip.merge.txt
|
||||
all segments saved to ../../data/ipv4_source.txt
|
||||
editor>>
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ func TestSplitSegmentV6(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestIterateSegments(t *testing.T) {
|
||||
handle, err := os.OpenFile("../../../data/segments.tests.mixed", os.O_RDONLY, 0600)
|
||||
handle, err := os.OpenFile("../../../data/sample/segments.tests.mixed", os.O_RDONLY, 0600)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to open tests file: %s", err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class SegmentTest {
|
|||
}
|
||||
|
||||
final String base = new File(res.getPath()).getParentFile().getParentFile().getParentFile().getParent();
|
||||
Segment.iterate(base+"/data/segments.tests.mixed", new Segment.IterateAction() {
|
||||
Segment.iterate(base+"/data/sample/segments.tests.mixed", new Segment.IterateAction() {
|
||||
@Override
|
||||
public void before(String line) {
|
||||
// log.debugf("load segment: `%s`", line);
|
||||
|
|
|
|||
Loading…
Reference in New Issue