mv all the tests files to the ./sample

This commit is contained in:
lionsoul2014 2026-03-13 09:36:24 +08:00
parent c63b1dc5db
commit 04e51e2182
12 changed files with 9 additions and 3470 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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>>
```

View File

@ -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>>
```

View File

@ -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)
}

View File

@ -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);