From e6634f2435cd1cd0bcd6929fd7bd46f0005c9908 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 12 Dec 2025 16:22:58 +0800 Subject: [PATCH] add qpdf test case --- docs/system_base/qpdf/tc_qpdf_fun001.yaml | 31 + docs/system_base/qpdf/tc_qpdf_fun002.yaml | 27 + docs/system_base/qpdf/tc_qpdf_fun003.yaml | 41 + tests/system_base/qpdf/1.pdf | 1502 +++++++++++++++++++++ tests/system_base/qpdf/encrypt.pdf | Bin 0 -> 12927 bytes tests/system_base/qpdf/infile.pdf | Bin 0 -> 1840 bytes tests/system_base/qpdf/stamp.pdf | Bin 0 -> 799 bytes tests/system_base/qpdf/tc_qpdf_fun001.py | 50 + tests/system_base/qpdf/tc_qpdf_fun002.py | 49 + tests/system_base/qpdf/tc_qpdf_fun003.py | 72 + tests/system_base/qpdf/warn.pdf | 0 11 files changed, 1772 insertions(+) create mode 100644 docs/system_base/qpdf/tc_qpdf_fun001.yaml create mode 100644 docs/system_base/qpdf/tc_qpdf_fun002.yaml create mode 100644 docs/system_base/qpdf/tc_qpdf_fun003.yaml create mode 100644 tests/system_base/qpdf/1.pdf create mode 100644 tests/system_base/qpdf/encrypt.pdf create mode 100644 tests/system_base/qpdf/infile.pdf create mode 100644 tests/system_base/qpdf/stamp.pdf create mode 100644 tests/system_base/qpdf/tc_qpdf_fun001.py create mode 100644 tests/system_base/qpdf/tc_qpdf_fun002.py create mode 100644 tests/system_base/qpdf/tc_qpdf_fun003.py create mode 100644 tests/system_base/qpdf/warn.pdf diff --git a/docs/system_base/qpdf/tc_qpdf_fun001.yaml b/docs/system_base/qpdf/tc_qpdf_fun001.yaml new file mode 100644 index 0000000000..48839c9208 --- /dev/null +++ b/docs/system_base/qpdf/tc_qpdf_fun001.yaml @@ -0,0 +1,31 @@ +作者: douzhichong +优先级: P1 +支持架构: noarch +执行方式: 自动 +测试类型: 功能测试 +通用标签: local,qpdf +用例描述: qpdf工具基本功能测试 +修改人: douzhichong + +前置条件: +- 系统已安装qpdf + +测试步骤: +- 验证qpdf版本命令能够正确执行并返回版本信息 +- 验证qpdf帮助命令能够正常显示帮助信息 +- 验证qpdf能够使用密码解密加密的PDF文件 +- 验证qpdf的verbose模式能够显示详细输出信息 +- 验证qpdf的no-warn选项能够抑制警告信息 +- 验证qpdf能够对PDF文件进行线性化处理 +- 创建临时目录用于测试输出文件 +- 测试完成后清理临时目录和测试环境 + +期望结果: +- qpdf版本命令能够正常执行并显示"qpdf version"信息 +- qpdf帮助命令能够正常执行并显示"help"相关信息 +- qpdf能够成功使用密码解密encrypt.pdf文件并输出startxref标记 +- qpdf的verbose模式能够显示"wrote"写入信息 +- qpdf的no-warn选项能够成功抑制警告信息输出 +- qpdf能够成功对infile.pdf文件进行线性化处理并输出EOF标记 +- 所有测试步骤均通过,无错误返回码 +- 测试完成后能够正确清理环境(删除临时目录和输出文件) diff --git a/docs/system_base/qpdf/tc_qpdf_fun002.yaml b/docs/system_base/qpdf/tc_qpdf_fun002.yaml new file mode 100644 index 0000000000..59cebcbbe3 --- /dev/null +++ b/docs/system_base/qpdf/tc_qpdf_fun002.yaml @@ -0,0 +1,27 @@ +作者: douzhichong +优先级: P1 +支持架构: noarch +执行方式: 自动 +测试类型: 功能测试 +通用标签: local,qpdf +用例描述: qpdf工具加密与解密功能测试 +修改人: douzhichong + +前置条件: +- 系统已安装qpdf + +测试步骤: +- 验证qpdf能够使用加密文件的加密配置创建新的空PDF文件 +- 验证qpdf能够使用加密文件密码创建新的加密PDF文件 +- 验证qpdf能够使用密码成功解密加密的PDF文件 +- 验证qpdf能够使用十六进制密钥密码解密加密的PDF文件 +- 验证qpdf能够在使用密码解密时抑制密码恢复功能 + +期望结果: +- qpdf能够成功复制encrypt.pdf的加密配置到output1.pdf空文件 +- qpdf能够成功复制encrypt.pdf的加密配置到output2.pdf空文件 +- qpdf能够使用密码123456成功解密encrypt.pdf为output3.pdf +- qpdf能够使用十六进制密钥密码成功处理encrypt.pdf为output4.pdf +- qpdf能够在抑制密码恢复功能的情况下成功解密encrypt.pdf为output5.pdf +- 所有测试步骤均通过,返回码为0 +- 测试完成后能够正确清理环境(删除生成的output*.pdf文件) diff --git a/docs/system_base/qpdf/tc_qpdf_fun003.yaml b/docs/system_base/qpdf/tc_qpdf_fun003.yaml new file mode 100644 index 0000000000..735c9d3291 --- /dev/null +++ b/docs/system_base/qpdf/tc_qpdf_fun003.yaml @@ -0,0 +1,41 @@ +作者: douzhichong +优先级: P1 +支持架构: noarch +执行方式: 自动 +测试类型: 功能测试 +通用标签: local,qpdf +用例描述: qpdf工具PDF加密权限控制功能测试 +修改人: douzhichong + +前置条件: +- 系统已安装qpdf + +测试步骤: +1. 使用256位密钥加密PDF文件,设置打印权限为low、修改权限为all,验证文件生成 +2. 使用256位密钥加密PDF文件,设置打印权限为full,验证文件生成 +3. 使用256位密钥加密PDF文件,设置打印权限为low,验证文件生成 +4. 使用256位密钥加密PDF文件,设置打印权限为none,验证文件生成 +5. 使用256位密钥加密PDF文件,设置修改权限为all,验证文件生成 +6. 使用256位密钥加密PDF文件,设置修改权限为annotate(批注),验证文件生成 +7. 使用256位密钥加密PDF文件,设置修改权限为form(表单),验证文件生成 +8. 使用256位密钥加密PDF文件,设置修改权限为assembly(汇编),验证文件生成 +9. 使用256位密钥加密PDF文件,设置修改权限为none,验证文件生成 +10. 使用256位密钥加密PDF文件,强制使用R5加密算法,验证文件生成 + +期望结果: +- 所有qpdf加密命令执行成功,返回码为0 +- 每次加密操作都能成功生成对应的输出PDF文件(output1.pdf至output11.pdf) +- 各输出文件具有相应的加密权限设置: + 1. output1.pdf:低打印权限,完全修改权限 + 2. output3.pdf:完全打印权限 + 3. output4.pdf:低打印权限 + 4. output5.pdf:无打印权限 + 5. output6.pdf:完全修改权限 + 6. output7.pdf:仅批注修改权限 + 7. output8.pdf:仅表单修改权限 + 8. output9.pdf:仅汇编修改权限 + 9. output10.pdf:无修改权限 + 10. output11.pdf:使用R5加密算法 +- 所有生成的加密文件均能通过test -f命令验证存在 +- 测试完成后成功清理所有生成的PDF文件 +- 测试环境恢复初始状态 diff --git a/tests/system_base/qpdf/1.pdf b/tests/system_base/qpdf/1.pdf new file mode 100644 index 0000000000..2003cf977e --- /dev/null +++ b/tests/system_base/qpdf/1.pdf @@ -0,0 +1,1502 @@ +%PDF-1.3 +% +%QDF-1.0 + +1 0 obj +<< + /PageLabels << /Nums [ + 0 << /P () >> + 2 << /S /r /St 1 >> + 7 << /P () >> + 9 << /S /r /St 6 >> + 11 << /P () >> + 12 << /S /D /St 2 >> + 15 << /S /D /St 6 >> + 19 << /P () >> + 20 << /S /D /St 12 >> + 22 << /S /D /St 16059 >> + 23 << /S /r /St 50 >> + 29 << /S /r /St 54 >> + ] >> + /Pages 2 0 R + /Type /Catalog + /PageMode /UseOutlines + /Outlines 95 0 R +>> +endobj + +2 0 obj +<< + /Count 30 + /Kids [ + 3 0 R + 4 0 R + 5 0 R + 6 0 R + 7 0 R + 8 0 R + 9 0 R + 10 0 R + 11 0 R + 12 0 R + 13 0 R + 14 0 R + 15 0 R + 16 0 R + 17 0 R + 18 0 R + 19 0 R + 20 0 R + 21 0 R + 22 0 R + 23 0 R + 24 0 R + 25 0 R + 26 0 R + 27 0 R + 28 0 R + 29 0 R + 30 0 R + 31 0 R + 32 0 R + ] + /Type /Pages +>> +endobj + +%% Page 1 +3 0 obj +<< + /Contents 33 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 2 +4 0 obj +<< + /Contents 37 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 3 +5 0 obj +<< + /Contents 39 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 4 +6 0 obj +<< + /Contents 41 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 5 +7 0 obj +<< + /Contents 43 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 6 +8 0 obj +<< + /Contents 45 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 7 +9 0 obj +<< + /Contents 47 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 8 +10 0 obj +<< + /Contents 49 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 9 +11 0 obj +<< + /Contents 51 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 10 +12 0 obj +<< + /Contents 53 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 11 +13 0 obj +<< + /Contents 55 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 12 +14 0 obj +<< + /Contents 57 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 13 +15 0 obj +<< + /Contents 59 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 14 +16 0 obj +<< + /Contents 61 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 15 +17 0 obj +<< + /Contents 63 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 16 +18 0 obj +<< + /Contents 65 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 17 +19 0 obj +<< + /Contents 67 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 18 +20 0 obj +<< + /Contents 69 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 19 +21 0 obj +<< + /Contents 71 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 20 +22 0 obj +<< + /Contents 73 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 21 +23 0 obj +<< + /Contents 75 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 22 +24 0 obj +<< + /Contents 77 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 23 +25 0 obj +<< + /Contents 79 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 24 +26 0 obj +<< + /Contents 81 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 25 +27 0 obj +<< + /Contents 83 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 26 +28 0 obj +<< + /Contents 85 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 27 +29 0 obj +<< + /Contents 87 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 28 +30 0 obj +<< + /Contents 89 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 29 +31 0 obj +<< + /Contents 91 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Page 30 +32 0 obj +<< + /Contents 93 0 R + /MediaBox [ + 0 + 0 + 612 + 792 + ] + /Parent 2 0 R + /Resources << + /Font << + /F1 35 0 R + >> + /ProcSet 36 0 R + >> + /Type /Page +>> +endobj + +%% Contents for page 1 +33 0 obj +<< + /Length 34 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 0) Tj +ET +endstream +endobj + +34 0 obj +46 +endobj + +35 0 obj +<< + /BaseFont /Helvetica + /Encoding /WinAnsiEncoding + /Name /F1 + /Subtype /Type1 + /Type /Font +>> +endobj + +36 0 obj +[ + /PDF + /Text +] +endobj + +%% Contents for page 2 +37 0 obj +<< + /Length 38 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 1) Tj +ET +endstream +endobj + +38 0 obj +46 +endobj + +%% Contents for page 3 +39 0 obj +<< + /Length 40 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 2) Tj +ET +endstream +endobj + +40 0 obj +46 +endobj + +%% Contents for page 4 +41 0 obj +<< + /Length 42 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 3) Tj +ET +endstream +endobj + +42 0 obj +46 +endobj + +%% Contents for page 5 +43 0 obj +<< + /Length 44 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 4) Tj +ET +endstream +endobj + +44 0 obj +46 +endobj + +%% Contents for page 6 +45 0 obj +<< + /Length 46 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 5) Tj +ET +endstream +endobj + +46 0 obj +46 +endobj + +%% Contents for page 7 +47 0 obj +<< + /Length 48 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 6) Tj +ET +endstream +endobj + +48 0 obj +46 +endobj + +%% Contents for page 8 +49 0 obj +<< + /Length 50 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 7) Tj +ET +endstream +endobj + +50 0 obj +46 +endobj + +%% Contents for page 9 +51 0 obj +<< + /Length 52 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 8) Tj +ET +endstream +endobj + +52 0 obj +46 +endobj + +%% Contents for page 10 +53 0 obj +<< + /Length 54 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 9) Tj +ET +endstream +endobj + +54 0 obj +46 +endobj + +%% Contents for page 11 +55 0 obj +<< + /Length 56 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 10) Tj +ET +endstream +endobj + +56 0 obj +47 +endobj + +%% Contents for page 12 +57 0 obj +<< + /Length 58 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 11) Tj +ET +endstream +endobj + +58 0 obj +47 +endobj + +%% Contents for page 13 +59 0 obj +<< + /Length 60 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 12) Tj +ET +endstream +endobj + +60 0 obj +47 +endobj + +%% Contents for page 14 +61 0 obj +<< + /Length 62 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 13) Tj +ET +endstream +endobj + +62 0 obj +47 +endobj + +%% Contents for page 15 +63 0 obj +<< + /Length 64 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 14) Tj +ET +endstream +endobj + +64 0 obj +47 +endobj + +%% Contents for page 16 +65 0 obj +<< + /Length 66 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 15) Tj +ET +endstream +endobj + +66 0 obj +47 +endobj + +%% Contents for page 17 +67 0 obj +<< + /Length 68 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 16) Tj +ET +endstream +endobj + +68 0 obj +47 +endobj + +%% Contents for page 18 +69 0 obj +<< + /Length 70 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 17) Tj +ET +endstream +endobj + +70 0 obj +47 +endobj + +%% Contents for page 19 +71 0 obj +<< + /Length 72 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 18) Tj +ET +endstream +endobj + +72 0 obj +47 +endobj + +%% Contents for page 20 +73 0 obj +<< + /Length 74 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 19) Tj +ET +endstream +endobj + +74 0 obj +47 +endobj + +%% Contents for page 21 +75 0 obj +<< + /Length 76 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 20) Tj +ET +endstream +endobj + +76 0 obj +47 +endobj + +%% Contents for page 22 +77 0 obj +<< + /Length 78 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 21) Tj +ET +endstream +endobj + +78 0 obj +47 +endobj + +%% Contents for page 23 +79 0 obj +<< + /Length 80 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 22) Tj +ET +endstream +endobj + +80 0 obj +47 +endobj + +%% Contents for page 24 +81 0 obj +<< + /Length 82 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 23) Tj +ET +endstream +endobj + +82 0 obj +47 +endobj + +%% Contents for page 25 +83 0 obj +<< + /Length 84 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 24) Tj +ET +endstream +endobj + +84 0 obj +47 +endobj + +%% Contents for page 26 +85 0 obj +<< + /Length 86 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 25) Tj +ET +endstream +endobj + +86 0 obj +47 +endobj + +%% Contents for page 27 +87 0 obj +<< + /Length 88 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 26) Tj +ET +endstream +endobj + +88 0 obj +47 +endobj + +%% Contents for page 28 +89 0 obj +<< + /Length 90 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 27) Tj +ET +endstream +endobj + +90 0 obj +47 +endobj + +%% Contents for page 29 +91 0 obj +<< + /Length 92 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 28) Tj +ET +endstream +endobj + +92 0 obj +47 +endobj + +%% Contents for page 30 +93 0 obj +<< + /Length 94 0 R +>> +stream +BT + /F1 24 Tf + 72 720 Td + (Potato 29) Tj +ET +endstream +endobj + +94 0 obj +47 +endobj + +95 0 obj +<< + /Type /Outlines + /First 97 0 R + /Last 96 0 R + /Count 6 +>> +endobj + +96 0 obj +<< + /Type /Outline + /Title (Isis 1 -> 5: /XYZ null null null) + /Parent 95 0 R + /Count 4 + /Prev 97 0 R + /First 98 0 R + /Last 99 0 R + /Dest [ 8 0 R /XYZ null null null ] +>> +endobj + +97 0 obj +<< + /Type /Outline + /Title (Trepak 2 -> 15: /XYZ 66 756 3) + /Parent 95 0 R + /Next 96 0 R + /Dest [ 18 0 R /XYZ 66 756 3 ] +>> +endobj + +98 0 obj +<< + /Type /Outline + /Title (Amanda 1.1 -> 11: /Fit) + /Parent 96 0 R + /Next 99 0 R + /First 100 0 R + /Last 101 0 R + /Count -3 + /Dest [ 14 0 R /Fit ] +>> +endobj + +99 0 obj +<< + /Type /Outline + /Title (Sandy 1.2 -> 13: /FitH 792) + /Parent 96 0 R + /Prev 98 0 R + /First 105 0 R + /Last 106 0 R + /Count 2 + /Dest [ 16 0 R /FitH 792 ] +>> +endobj + +100 0 obj +<< + /Type /Outline + /Title (Isosicle 1.1.1 -> 12: /FitV 100) + /Parent 98 0 R + /Next 101 0 R + /First 102 0 R + /Last 103 0 R + /Count -2 + /Dest [ 15 0 R /FitV 100 ] +>> +endobj + +101 0 obj +<< + /Type /Outline + /Title (Isosicle 1.1.2 -> 12: /XYZ null null null) + /Parent 98 0 R + /Prev 100 0 R + /First 104 0 R + /Last 104 0 R + /Count 1 + /Dest [ 15 0 R /XYZ null null null ] +>> +endobj + +102 0 obj +<< + /Type /Outline + /Title (Isosicle 1.1.1.1 -> 18: /XYZ null null null) + /Parent 100 0 R + /Next 103 0 R + /Dest [ 21 0 R /XYZ null null null ] +>> +endobj + +103 0 obj +<< + /Type /Outline + /Title (Isosicle 1.1.1.2 -> 19: /XYZ null null null) + /Parent 100 0 R + /Prev 102 0 R + /Dest [ 22 0 R /XYZ null null null ] +>> +endobj + +104 0 obj +<< + /Type /Outline + /Title (Isosicle 1.1.2.1 -> 22: /XYZ null null null) + /Parent 101 0 R + /Dest [ 25 0 R /XYZ null null null ] +>> +endobj + +105 0 obj +<< + /Type /Outline + /Title (Trepsichord 1.2.1 -> 1: /FitR 66 714 180 770) + /Parent 99 0 R + /Next 106 0 R + /Dest [ 4 0 R /FitR 66 714 180 770 ] +>> +endobj + +106 0 obj +<< + /Type /Outline + /Title (Trepsicle 1.2.2 -> 0: /XYZ null null null) + /Parent 99 0 R + /Prev 105 0 R + /Dest [ 3 0 R /XYZ null null null ] +>> +endobj + +xref +0 107 +0000000000 65535 f +0000000025 00000 n +0000000434 00000 n +0000000830 00000 n +0000001035 00000 n +0000001240 00000 n +0000001445 00000 n +0000001650 00000 n +0000001855 00000 n +0000002060 00000 n +0000002265 00000 n +0000002471 00000 n +0000002678 00000 n +0000002885 00000 n +0000003092 00000 n +0000003299 00000 n +0000003506 00000 n +0000003713 00000 n +0000003920 00000 n +0000004127 00000 n +0000004334 00000 n +0000004541 00000 n +0000004748 00000 n +0000004955 00000 n +0000005162 00000 n +0000005369 00000 n +0000005576 00000 n +0000005783 00000 n +0000005990 00000 n +0000006197 00000 n +0000006404 00000 n +0000006611 00000 n +0000006818 00000 n +0000007037 00000 n +0000007140 00000 n +0000007160 00000 n +0000007279 00000 n +0000007338 00000 n +0000007441 00000 n +0000007484 00000 n +0000007587 00000 n +0000007630 00000 n +0000007733 00000 n +0000007776 00000 n +0000007879 00000 n +0000007922 00000 n +0000008025 00000 n +0000008068 00000 n +0000008171 00000 n +0000008214 00000 n +0000008317 00000 n +0000008360 00000 n +0000008463 00000 n +0000008507 00000 n +0000008610 00000 n +0000008654 00000 n +0000008758 00000 n +0000008802 00000 n +0000008906 00000 n +0000008950 00000 n +0000009054 00000 n +0000009098 00000 n +0000009202 00000 n +0000009246 00000 n +0000009350 00000 n +0000009394 00000 n +0000009498 00000 n +0000009542 00000 n +0000009646 00000 n +0000009690 00000 n +0000009794 00000 n +0000009838 00000 n +0000009942 00000 n +0000009986 00000 n +0000010090 00000 n +0000010134 00000 n +0000010238 00000 n +0000010282 00000 n +0000010386 00000 n +0000010430 00000 n +0000010534 00000 n +0000010578 00000 n +0000010682 00000 n +0000010726 00000 n +0000010830 00000 n +0000010874 00000 n +0000010978 00000 n +0000011022 00000 n +0000011126 00000 n +0000011170 00000 n +0000011274 00000 n +0000011318 00000 n +0000011422 00000 n +0000011466 00000 n +0000011570 00000 n +0000011590 00000 n +0000011677 00000 n +0000011873 00000 n +0000012019 00000 n +0000012194 00000 n +0000012377 00000 n +0000012568 00000 n +0000012778 00000 n +0000012947 00000 n +0000013116 00000 n +0000013269 00000 n +0000013438 00000 n +trailer << + /Root 1 0 R + /Size 107 +>> +startxref +13603 +%%EOF diff --git a/tests/system_base/qpdf/encrypt.pdf b/tests/system_base/qpdf/encrypt.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9339dfe545035f3b5c668c199e00fb95f0d3df31 GIT binary patch literal 12927 zcmc&*d0bUx`cJbotR|OnEju=1V&XmT*^h$?BDjVGMk=_R6-gF@3vS@n=%ndn?&F@g zprfRtQv$L$V_I&xgu6!Wq9d42nyLJrvs}5{mmiq_Tt0fdy!Sot^L>{0d(QcuN8j+C zq5h~d?c-Z`Z}npzM36+1{Gm@k0O1&r>Wq&|)KUlv1|tYZxD>1Pmt-wIg)qJjOHD{2 zqTws!mvEwkAJMHFOf`OsBpk_bbP~uI(_Doz=di95twHNV zYqclVEiho-nga_Nm^_w49Lb927qn|h3oT2UqaFxZ#uy!H9Lx~Bo1|)lWbcV*y5%bz~Vv))L5C16hk8 zYZb~`g|b$Guo|mS)+&^>3T3TAS*uXiDwMSfWvv2mjq_-071~;bwpO97RcLFKp@hQ<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000000000..2093108c6b --- /dev/null +++ b/tests/system_base/qpdf/tc_qpdf_fun001.py @@ -0,0 +1,50 @@ +""" +@File: tc_qpdf_fun001.py +@Time: 2025/12/12 15:30:20 +@Author: douzhichong +@Version: 1.0 +@Contact: douzhichong@inspur.com +@License: Mulan PSL v2 +@Modify: douzhichong +""" +import subprocess + +from common.basetest import LocalTest + + +class Test(LocalTest): + """ + See tc_qpdf_fun001.yaml for details + + :avocado: tags=P1,noarch,local,qpdf + """ + PARAM_DIC = {"pkg_name": "qpdf"} + + def setUp(self): + super().setUp(self.PARAM_DIC) + self.cmd('mkdir temp') + + def test(self): + + code, result = self.cmd(f'qpdf -version| grep "qpdf version"') + self.assertFalse(code, "qpdf --version running failed") + + code, result = self.cmd('qpdf --help | grep "help"') + self.assertFalse(code, "qpdf --help running failed") + + code, result = self.cmd('qpdf --password=123456 ./tests/system_base/qpdf/encrypt.pdf - | grep "startxref"') + self.assertFalse(code, "qpdf --password=password running failed") + + code, result = self.cmd('qpdf --verbose --empty ./temp/output.pdf | grep "wrote"') + self.assertFalse(code, "qpdf --verbose running failed") + + command = 'qpdf --no-warn --check ./tests/system_base/qpdf/warn.pdf 2>&1 | grep -i "warning"' + result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + self.assertTrue(result.returncode, "qpdf -no-warn running failed") + + code, result = self.cmd('qpdf --linearize ./tests/system_base/qpdf/infile.pdf - | grep "EOF"') + self.assertFalse(code, "qpdf --linearize running failed") + + def tearDown(self): + self.cmd('rm -rf temp') + super().tearDown(self.PARAM_DIC) diff --git a/tests/system_base/qpdf/tc_qpdf_fun002.py b/tests/system_base/qpdf/tc_qpdf_fun002.py new file mode 100644 index 0000000000..82c925ed3d --- /dev/null +++ b/tests/system_base/qpdf/tc_qpdf_fun002.py @@ -0,0 +1,49 @@ +""" +@File: tc_qpdf_fun002.py +@Time: 2025/12/12 15:30:20 +@Author: douzhichong +@Version: 1.0 +@Contact: douzhichong@inspur.com +@License: Mulan PSL v2 +@Modify: douzhichong +""" +import subprocess + +from common.basetest import LocalTest + + +class Test(LocalTest): + """ + See tc_qpdf_fun002.yaml for details + + :avocado: tags=P1,noarch,local,qpdf + """ + PARAM_DIC = {"pkg_name": "qpdf"} + + def setUp(self): + super().setUp(self.PARAM_DIC) + + def test(self): + code, result = self.cmd( + 'qpdf --copy-encryption=./tests/system_base/qpdf/encrypt.pdf --encryption-file-password=123456 --empty output1.pdf && test -f output1.pdf') + self.assertFalse(code, "qpdf --copy-encryption --encryption-file-password running failed") + + code, result = self.cmd( + 'qpdf --copy-encryption=./tests/system_base/qpdf/encrypt.pdf --encryption-file-password=123456 --empty output2.pdf && test -f output2.pdf') + self.assertFalse(code, "qpdf --encryption-file-password=password running failed") + + code, result = self.cmd( + 'qpdf --password=123456 --decrypt ./tests/system_base/qpdf/encrypt.pdf output3.pdf && test -f output3.pdf') + self.assertFalse(code, "qpdf --decrypt running failed") + + code, result = self.cmd('qpdf --password-is-hex-key ./tests/system_base/qpdf/encrypt.pdf output4.pdf && test -f output4.pdf') + self.assertFalse(code, "qpdf --password-is-hex-key running failed") + + code, result = self.cmd( + 'qpdf --decrypt --password=123456 --suppress-recovery ./tests/system_base/qpdf/encrypt.pdf output5.pdf && test -f output5.pdf') + self.assertFalse(code, "qpdf --suppress-password-recovery running failed") + + + def tearDown(self): + self.cmd("rm -rf *.pdf") + super().tearDown(self.PARAM_DIC) diff --git a/tests/system_base/qpdf/tc_qpdf_fun003.py b/tests/system_base/qpdf/tc_qpdf_fun003.py new file mode 100644 index 0000000000..2a696c9cd6 --- /dev/null +++ b/tests/system_base/qpdf/tc_qpdf_fun003.py @@ -0,0 +1,72 @@ +""" +@File: tc_qpdf_fun003.py +@Time: 2025/12/12 15:30:20 +@Author: douzhichong +@Version: 1.0 +@Contact: douzhichong@inspur.com +@License: Mulan PSL v2 +@Modify: douzhichong +""" +import subprocess + +from common.basetest import LocalTest + + +class Test(LocalTest): + """ + See tc_qpdf_fun003.yaml for details + + :avocado: tags=P1,noarch,local,qpdf + """ + PARAM_DIC = {"pkg_name": "qpdf"} + + def setUp(self): + super().setUp(self.PARAM_DIC) + + def test(self): + code, result = self.cmd( + 'qpdf --encrypt 123456 123456 256 --print=low --modify=all -- ./tests/system_base/qpdf/infile.pdf output1.pdf && test -f output1.pdf') + self.assertFalse(code, "qpdf --encrypt options with key-length=256 running failed") + + + code, result = self.cmd( + 'qpdf --encrypt 123456 123456 256 --print=full -- ./tests/system_base/qpdf/infile.pdf output3.pdf && test -f output3.pdf') + self.assertFalse(code, "qpdf --encrypt options with key-length=256 --print=full running failed") + + code, result = self.cmd( + 'qpdf --encrypt 123456 123456 256 --print=low -- ./tests/system_base/qpdf/infile.pdf output4.pdf && test -f output4.pdf') + self.assertFalse(code, "qpdf --encrypt options with key-length=256 --print=low running failed") + + code, result = self.cmd( + 'qpdf --encrypt 123456 123456 256 --print=none -- ./tests/system_base/qpdf/infile.pdf output5.pdf && test -f output5.pdf') + self.assertFalse(code, "qpdf --encrypt options with key-length=256 --print=none running failed") + + code, result = self.cmd( + 'qpdf --encrypt 123456 123456 256 --modify=all -- ./tests/system_base/qpdf/infile.pdf output6.pdf && test -f output6.pdf') + self.assertFalse(code, "qpdf --encrypt options with key-length=256 --modify=all running failed") + + code, result = self.cmd( + 'qpdf --encrypt 123456 123456 256 --modify=annotate -- ./tests/system_base/qpdf/infile.pdf output7.pdf && test -f output7.pdf') + self.assertFalse(code, "qpdf --encrypt options with key-length=256 --modify=annotate running failed") + + code, result = self.cmd( + 'qpdf --encrypt 123456 123456 256 --modify=form -- ./tests/system_base/qpdf/infile.pdf output8.pdf && test -f output8.pdf') + self.assertFalse(code, "qpdf --encrypt options with key-length=256 --modify=form running failed") + + code, result = self.cmd( + 'qpdf --encrypt 123456 123456 256 --modify=assembly -- ./tests/system_base/qpdf/infile.pdf output9.pdf && test -f output9.pdf') + self.assertFalse(code, "qpdf --encrypt options with key-length=256 --modify=assembly running failed") + + code, result = self.cmd( + 'qpdf --encrypt 123456 123456 256 --modify=none -- ./tests/system_base/qpdf/infile.pdf output10.pdf && test -f output10.pdf') + self.assertFalse(code, "qpdf --encrypt options with key-length=256 --modify=none running failed") + + code, result = self.cmd( + 'qpdf --encrypt 123456 123456 256 --force-R5 -- ./tests/system_base/qpdf/infile.pdf output11.pdf && test -f output11.pdf') + self.assertFalse(code, "qpdf --encrypt options with key-length=256 running failed") + + + def tearDown(self): + self.cmd("rm -rf *.pdf") + super().tearDown(self.PARAM_DIC) + diff --git a/tests/system_base/qpdf/warn.pdf b/tests/system_base/qpdf/warn.pdf new file mode 100644 index 0000000000..e69de29bb2 -- Gitee