diff --git a/aqt/metadata.py b/aqt/metadata.py index 1b73c966..d0376df3 100644 --- a/aqt/metadata.py +++ b/aqt/metadata.py @@ -336,8 +336,13 @@ def to_folder(self, version: Version, qt_version_no_dots: str, extension: Option ext="_" + extension if extension else "", ) else: - base = f"qt{version.major}_{qt_version_no_dots}" - return f"{base}/{base}" + # traditional structure, still used by sde. + return "{category}{major}_{ver}{ext}".format( + category=self.category, + major=qt_version_no_dots[0], + ver=qt_version_no_dots, + ext="_" + extension if extension else "", + ) elif version >= Version("6.5.0") and self.target == "wasm": # Qt 6.5-6.7 WASM uses direct wasm_[single|multi]thread folder if extension: diff --git a/tests/data/all_os-681-src-doc-example-expect.json b/tests/data/all_os-681-src-doc-example-expect.json new file mode 100644 index 00000000..81fc2d7c --- /dev/null +++ b/tests/data/all_os-681-src-doc-example-expect.json @@ -0,0 +1,97 @@ +{ + "src": { + "modules": [], + "archives": [ + "qt3d", + "qt5", + "qt5compat", + "qtactiveqt", + "qtbase", + "qtcharts", + "qtcoap", + "qtconnectivity", + "qtdatavis3d", + "qtdeclarative", + "qtdoc", + "qtgraphs", + "qtgrpc", + "qthttpserver", + "qtimageformats", + "qtlanguageserver", + "qtlocation", + "qtlottie", + "qtmqtt", + "qtmultimedia", + "qtnetworkauth", + "qtopcua", + "qtpositioning", + "qtquick3d", + "qtquick3dphysics", + "qtquickeffectmaker", + "qtquicktimeline", + "qtremoteobjects", + "qtscxml", + "qtsensors", + "qtserialbus", + "qtserialport", + "qtshadertools", + "qtspeech", + "qtsvg", + "qttools", + "qttranslations", + "qtvirtualkeyboard", + "qtwayland", + "qtwebchannel", + "qtwebsockets", + "qtwebview" + ] + }, + "doc": { + "modules": [], + "archives": [ + "qdoc", + "qmake", + "qt5", + "qtassistant", + "qtcmake", + "qtconcurrent", + "qtcore", + "qtdbus", + "qtdesigner", + "qtdistancefieldgenerator", + "qtdoc", + "qtgui", + "qthelp", + "qtlabsplatform", + "qtlinguist", + "qtnetwork", + "qtopengl", + "qtplatformintegration", + "qtprintsupport", + "qtqml", + "qtqmlcore", + "qtqmlmodels", + "qtqmltest", + "qtqmlworkerscript", + "qtqmlxmllistmodel", + "qtquick", + "qtquickcontrols", + "qtquickdialogs", + "qtsql", + "qtsvg", + "qttestlib", + "qtuitools", + "qtwidgets", + "qtxml" + ] + }, + "examples": { + "modules": [], + "archives": [ + "qtbase", + "qtdeclarative", + "qtdoc", + "qttools" + ] + } +} diff --git a/tests/data/all_os-681-src-doc-example-update.xml b/tests/data/all_os-681-src-doc-example-update.xml new file mode 100644 index 00000000..9d97b457 --- /dev/null +++ b/tests/data/all_os-681-src-doc-example-update.xml @@ -0,0 +1,1496 @@ + + {AnyApplication} + 1.0.0 + true + + qt.qt6.681 + Qt 6.8.1 + Qt 6.8.1 <br><br>sha1: 41d5d04f71871d94a76a1910ef153139a9746c32 + 6.8.1-0-202411221531 + 2024-11-22 + + qt.qt6.681.doc, qt.qt6.681.examples, qt.tools.qtcreator + + false + 60801 + sha1s.txt.7z + + + + @TargetDir@/6.8.1 + sha1s.txt.7z + + + 230129f6b30641fe084ee4048faf50ce287c8e85 + + + qt.qt6.681.addons + Additional Libraries + Additional Libraries for Qt 6.8.1.<br><br>Most of the additional libraries are available under commercial licenses from The Qt Company, or under GPL v3. For open source use, please note the additional requirements compared to LGPL v3. + 6.8.1-0-202411221531 + 2024-11-22 + + false + 3 + + + bb988e97ce4b1f20951652eb569b4d478a0cd2e5 + + + qt.qt6.681.doc + Qt 6.8.1 Documentation + Qt 6.8.1 documentation + 6.8.1-0-202411221531 + 2024-11-22 + qt.tools + true + + 1 + qt5-documentation.zip, qdoc-documentation.zip, qmake-documentation.zip, qtassistant-documentation.zip, qtconcurrent-documentation.zip, qtcmake-documentation.zip, qtcore-documentation.zip, qtdbus-documentation.zip, qtdesigner-documentation.zip, qtdistancefieldgenerator-documentation.zip, qtdoc-documentation.zip, qtgui-documentation.zip, qthelp-documentation.zip, qtlabsplatform-documentation.zip, qtlinguist-documentation.zip, qtnetwork-documentation.zip, qtopengl-documentation.zip, qtplatformintegration-documentation.zip, qtprintsupport-documentation.zip, qtqml-documentation.zip, qtqmlcore-documentation.zip, qtqmlmodels-documentation.zip, qtqmltest-documentation.zip, qtqmlworkerscript-documentation.zip, qtqmlxmllistmodel-documentation.zip, qtquick-documentation.zip, qtquickcontrols-documentation.zip, qtquickdialogs-documentation.zip, qtsql-documentation.zip, qtsvg-documentation.zip, qttestlib-documentation.zip, qtuitools-documentation.zip, qtwidgets-documentation.zip, qtxml-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qt5-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qdoc-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qmake-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtassistant-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtconcurrent-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtcmake-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtcore-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtdbus-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtdesigner-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtdistancefieldgenerator-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtdoc-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtgui-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qthelp-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtlabsplatform-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtlinguist-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtnetwork-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtopengl-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtplatformintegration-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtprintsupport-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtqml-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtqmlcore-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtqmlmodels-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtqmltest-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtqmlworkerscript-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtqmlxmllistmodel-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtquick-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtquickcontrols-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtquickdialogs-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtsql-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtsvg-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qttestlib-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtuitools-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtwidgets-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtxml-documentation.zip + + + d666969baea5debc7a6060cd6d80f06c5eb84991 + + + qt.qt6.681.doc.qt3d + Documentation for Qt 6.8.1 Qt 3D + Documentation for Qt 6.8.1 Qt 3D + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qt3d-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qt3d-documentation.zip + + + 5a9f5bf280bf39e504e17b3c208898cf2eb95ea6 + + + qt.qt6.681.doc.qt5compat + Documentation for Qt 6.8.1 Qt 5 Compatibility Module + Documentation for Qt 6.8.1 Qt 5 Compatibility Module + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtcore5compat-documentation.zip, qtgraphicaleffects5compat-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtcore5compat-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtgraphicaleffects5compat-documentation.zip + + + 75f2ab3e004ad05090b6b99a3be16111b75d9780 + + + qt.qt6.681.doc.qtactiveqt + Documentation for Qt 6.8.1 Qt 3D + Documentation for Qt 6.8.1 Qt 3D + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + activeqt-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + activeqt-documentation.zip + + + 59b22118f65472402fa4800f33f6e6af601aba7c + + + qt.qt6.681.doc.qtbluetooth + Documentation for Qt 6.8.1 GPLv3 components (QtConnectivity/Bluetooth) + Documentation for Qt 6.8.1 GPLv3 components (QtConnectivity/Bluetooth) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtbluetooth-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtbluetooth-documentation.zip + + + ebf058d4935d638127e4bbbb8f0f4223dcc6acfa + + + qt.qt6.681.doc.qtcharts + Documentation for Qt 6.8.1 GPLv3 components (QtCharts) + Documentation for Qt 6.8.1 GPLv3 components (QtCharts) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtcharts-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtcharts-documentation.zip + + + b0cca26f7e6c8212ea0798abf7bc5700c7ea39b6 + + + qt.qt6.681.doc.qtdatavis3d + Documentation for Qt 6.8.1 GPLv3 components (QtDataVisualization) + Documentation for Qt 6.8.1 GPLv3 components (QtDataVisualization) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtdatavis3d-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtdatavis3d-documentation.zip + + + 24c319fde71f0904e37040e45acf08042f89e832 + + + qt.qt6.681.doc.qtgraphs + Documentation for Qt 6.8.1 GPLv3 components (QtGraphs) + Documentation for Qt 6.8.1 GPLv3 components (QtGraphs) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtgraphs-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtgraphs-documentation.zip + + + 6244d9dbb8eca9b4532cd9f674485b357e207019 + + + qt.qt6.681.doc.qtgrpc + Documentation for Qt 6.8.1 Qt Protobuf and Qt GRPC + Documentation for Qt 6.8.1 Qt Protobuf and Qt GRPC + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtprotobuf-documentation.zip, qtgrpc-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtprotobuf-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtgrpc-documentation.zip + + + 04b7bbb77e9a9d63c7ff5f51e90a81c13653f6b6 + + + qt.qt6.681.doc.qthttpserver + Documentation for Qt 6.8.1 HTTP Server + Documentation for Qt 6.8.1 HTTP Server + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qthttpserver-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qthttpserver-documentation.zip + + + a8b561af935090afdc3f1fc1c49c3f171054b5b6 + + + qt.qt6.681.doc.qtimageformats + Documentation for Qt 6.8.1 Imageformats + Documentation for Qt 6.8.1 Imageformats + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtimageformats-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtimageformats-documentation.zip + + + 2a6859a69b9bd0fe1ce06522546c21a0f4b2c61e + + + qt.qt6.681.doc.qtlanguageserver + Documentation for Qt 6.8.1 language Server + Documentation for Qt 6.8.1 language Server + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + + + 6d5700e7a06607775529bdbe4aed9585f605a90b + + + qt.qt6.681.doc.qtlocation + Documentation for Qt 6.8.1 Location + Documentation for Qt 6.8.1 Location + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtlocation-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtlocation-documentation.zip + + + a9d883e540cd8c1aeb1073dbd4bc554d59920f97 + + + qt.qt6.681.doc.qtlottie + Documentation for Qt 6.8.1 Lottie Animation + Documentation for Qt 6.8.1 Lottie Animation + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtlottieanimation-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtlottieanimation-documentation.zip + + + c7ae07771950d4fd4420ec477d84769ba169b9f1 + + + qt.qt6.681.doc.qtmultimedia + Documentation for Qt Multimedia + Documentation for Qt Multimedia + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtmultimedia-documentation.zip, qtspatialaudio-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtmultimedia-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtspatialaudio-documentation.zip + + + 316d53aabaafcdc7f13a74a835da5f6d5ad15918 + + + qt.qt6.681.doc.qtnetworkauth + Documentation for Qt Networkauth (Technology Preview) + Documentation for Qt Networkauth (Technology Preview) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtnetworkauth-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtnetworkauth-documentation.zip + + + ea2fb8aebea0658e8768baa52d950aa771a04fda + + + qt.qt6.681.doc.qtnfc + Documentation for Qt 6.8.1 GPLv3 components (QtConnectivity/NFC) + Documentation for Qt 6.8.1 GPLv3 components (QtConnectivity/NFC) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtnfc-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtnfc-documentation.zip + + + 4a3dae5f2b7e16178ae68227c619eef6d7aec9d6 + + + qt.qt6.681.doc.qtpositioning + Documentation for Qt 6.8.1 GPLv3 components (QtPositioning) + Documentation for Qt 6.8.1 GPLv3 components (QtPositioning) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtpositioning-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtpositioning-documentation.zip + + + f242155f0266107a7230a130b49fea5467334342 + + + qt.qt6.681.doc.qtquick3d + Documentation for Qt 6.8.1 GPLv3 components (QtQuick3D) + Documentation for Qt 6.8.1 GPLv3 components (QtQuick3D) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtquick3d-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtquick3d-documentation.zip + + + cf0feeebeafaf5c136f9d6469a6bde6145d51377 + + + qt.qt6.681.doc.qtquick3dphysics + Documentation for Qt 6.8.1 Quick: 3D Physics + Documentation for Qt 6.8.1 Quick: 3D Physics + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtquick3dphysics-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtquick3dphysics-documentation.zip + + + f8abb51d9e1b31cccf3db13e7e5cfbb944cb47b9 + + + qt.qt6.681.doc.qtquickeffectmaker + Documentation for Qt 6.8.1 Quick Effect Maker + Documentation for Qt 6.8.1 Quick Effect Maker + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtquickeffectmaker-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtquickeffectmaker-documentation.zip + + + e64d14a958f7a08c2fcff217a11e52ad251c819a + + + qt.qt6.681.doc.qtquicktimeline + Documentation for Qt Quick Timeline + Documentation for Qt Quick Timeline + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtquicktimeline-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtquicktimeline-documentation.zip + + + 38bc6e40ec5b2142762d0630acac07565c2bd015 + + + qt.qt6.681.doc.qtremoteobjects + Documentation for Qt Remote Objects + Documentation for Qt Remote Objects + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtremoteobjects-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtremoteobjects-documentation.zip + + + 29afe87d4b13d17cc059a58eda46370cdc51e0d5 + + + qt.qt6.681.doc.qtscxml + Documentation for Qt 6.8.1 SCXML + Documentation for Qt 6.8.1 SCXML + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtscxml-documentation.zip, qtstatemachine-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtscxml-documentation.zip + + + @TargetDir@/Docs/Qt-6.8.1 + qtstatemachine-documentation.zip + + + e3f67fb39093dd70f0d8575d2ea651aa6d3a37c2 + + + qt.qt6.681.doc.qtsensors + Documentation for Qt 6.8.1 Sensors + Documentation for Qt 6.8.1 Sensors + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtsensors-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtsensors-documentation.zip + + + c976c83f5f84194504d4ffa29bc7b047365c0359 + + + qt.qt6.681.doc.qtserialbus + Documentation for Qt 6.8.1 SerialBus + Documentation for Qt 6.8.1 SerialBus + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtserialbus-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtserialbus-documentation.zip + + + a59c35c7f8832df43339a1ca72705b9426bf24a6 + + + qt.qt6.681.doc.qtserialport + Documentation for Qt 6.8.1 SerialPort + Documentation for Qt 6.8.1 SerialPort + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtserialport-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtserialport-documentation.zip + + + 41f2d26a57676eb310b865ccec9e39681b4746eb + + + qt.qt6.681.doc.qtshadertools + Documentation for Qt 6.8.1 Qt Shader Tools + Documentation for Qt 6.8.1 Qt Shader Tools + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtshadertools-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtshadertools-documentation.zip + + + 6cb1495b580c913f11a4d4113de8b21444525316 + + + qt.qt6.681.doc.qtspeech + Documentation for Qt Speech (Technology Preview) + Documentation for Qt Speech (Technology Preview) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qttexttospeech-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qttexttospeech-documentation.zip + + + 1048d61bdbb686eb272888fbe55471e750dc3a11 + + + qt.qt6.681.doc.qtvirtualkeyboard + Documentation for Qt 6.8.1 GPLv3 components (QtVirtualKeyboard) + Documentation for Qt 6.8.1 GPLv3 components (QtVirtualKeyboard) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtvirtualkeyboard-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtvirtualkeyboard-documentation.zip + + + 236664616105f09c409ab5824cfacaee7c9b559c + + + qt.qt6.681.doc.qtwaylandcompositor + Documentation for Qt 6.8.1 Qt Wayland Compositor + Documentation for Qt 6.8.1 Qt Wayland Compositor + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtwaylandcompositor-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtwaylandcompositor-documentation.zip + + + 1ccd280c2eab971dd7d26fcd30c59d8451898eeb + + + qt.qt6.681.doc.qtwebchannel + Documentation for Qt 6.8.1 WebChannel + Documentation for Qt 6.8.1 WebChannel + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtwebchannel-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtwebchannel-documentation.zip + + + 4c331284d1e4d914ba4f8436ecee80f19e845ba0 + + + qt.qt6.681.doc.qtwebsockets + Documentation for Qt 6.8.1 WebSockets + Documentation for Qt 6.8.1 WebSockets + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtwebsockets-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtwebsockets-documentation.zip + + + 37a31936f786d336b12e0f42706cb9725a663b6b + + + qt.qt6.681.doc.qtwebview + Documentation for Qt 6.8.1 WebView + Documentation for Qt 6.8.1 WebView + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtwebview-documentation.zip + + + + @TargetDir@/Docs/Qt-6.8.1 + qtwebview-documentation.zip + + + a9fd8d86c279617a82e115b8096fea41e14a381b + + + qt.qt6.681.examples + Qt 6.8.1 Examples + Qt 6.8.1 Examples + 6.8.1-0-202411221531 + 2024-11-22 + qt.tools + true + + 1 + qtbase-examples-6.8.1.7z, qtdeclarative-examples-6.8.1.7z, qtdoc-examples-6.8.1.7z, qttools-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtbase-examples-6.8.1.7z + + + @TargetDir@/Examples/Qt-6.8.1 + qtdeclarative-examples-6.8.1.7z + + + @TargetDir@/Examples/Qt-6.8.1 + qtdoc-examples-6.8.1.7z + + + @TargetDir@/Examples/Qt-6.8.1 + qttools-examples-6.8.1.7z + + + dd8d7caf7d514e0092ea71532a2036a2833164bf + + + qt.qt6.681.examples.qt3d + Examples for Qt 6.8.1 3D + Examples for Qt 6.8.1 3D + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qt3d-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qt3d-examples-6.8.1.7z + + + f0a104d5c8d7e114a269b04cccad0cdbdffa254f + + + qt.qt6.681.examples.qt5compat + Examples for Qt 6.8.1 Qt 5 Compatibility Module + Examples for Qt 6.8.1 Qt 5 Compatibility Module + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qt5compat-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qt5compat-examples-6.8.1.7z + + + d705fc70f702217c988c58dd3d38d57eba3a01d7 + + + qt.qt6.681.examples.qtactiveqt + Examples for Qt 6.8.1 Active Qt + Examples for Qt 6.8.1 Active Qt + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtactiveqt-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtactiveqt-examples-6.8.1.7z + + + c973e9e0a29f9b7aa8d9499aa54ea9e75179be88 + + + qt.qt6.681.examples.qtcharts + Examples for Qt 6.8.1 GPLv3 components (QtCharts) + Examples for Qt 6.8.1 GPLv3 components (QtCharts) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtcharts-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtcharts-examples-6.8.1.7z + + + a6b00f0a71e5665aa08dbb81b5ffee7054946e42 + + + qt.qt6.681.examples.qtconnectivity + Examples for Qt 6.8.1 GPLv3 components (QtConnectivity) + Examples for Qt 6.8.1 GPLv3 components (QtConnectivity) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtconnectivity-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtconnectivity-examples-6.8.1.7z + + + 695719756df18d19981f36420e5d6d6cc7e04d4d + + + qt.qt6.681.examples.qtdatavis3d + Examples for Qt 6.8.1 GPLv3 components (QtDataVisualization) + Examples for Qt 6.8.1 GPLv3 components (QtDataVisualization) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtdatavis3d-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtdatavis3d-examples-6.8.1.7z + + + 6c23dd9edbe33d2004935528e2597f076277e441 + + + qt.qt6.681.examples.qtgraphs + Examples for Qt 6.8.1 GPLv3 components (QtGraphs) + Examples for Qt 6.8.1 GPLv3 components (QtGraphs) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtgraphs-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtgraphs-examples-6.8.1.7z + + + 041cc8fabf7bbeca269e5c76696447409b08f6c8 + + + qt.qt6.681.examples.qtgrpc + Examples for Qt 6.8.1 Protobuf and Qt 6.8.1 GRPC + Examples for Qt 6.8.1 Protobuf and Qt 6.8.1 GRPC + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtgrpc-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtgrpc-examples-6.8.1.7z + + + 9e86ebbd4e9a302478131284c3e5eae4f9f85c81 + + + qt.qt6.681.examples.qthttpserver + Examples for Qt 6.8.1 HTTP Server + Examples for Qt 6.8.1 HTTP Server + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qthttpserver-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qthttpserver-examples-6.8.1.7z + + + 4e38395f66ca38911dfb9c5808ae7d8e0eae7045 + + + qt.qt6.681.examples.qtlocation + Examples for Qt 6.8.1 Location + Examples for Qt 6.8.1 Location + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtlocation-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtlocation-examples-6.8.1.7z + + + 73057d1ee9c95bfe75ca4aca6a2177971324ff34 + + + qt.qt6.681.examples.qtmultimedia + Examples for Qt Multimedia + Examples for Qt Multimedia + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtmultimedia-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtmultimedia-examples-6.8.1.7z + + + e0d8f272298a8cea25e0ad2351884a379abbb897 + + + qt.qt6.681.examples.qtnetworkauth + Examples for Qt Networkauth (Technology Preview) + Examples for Qt Networkauth (Technology Preview) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtnetworkauth-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtnetworkauth-examples-6.8.1.7z + + + 9a5fe97549680570685784e54d5251119bbf2852 + + + qt.qt6.681.examples.qtpositioning + Examples for Qt 6.8.1 GPLv3 components (QtPositioning) + Examples for Qt 6.8.1 GPLv3 components (QtPositioning) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtpositioning-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtpositioning-examples-6.8.1.7z + + + 17ebac44cc9fade70884ebdd1f9ca98c600552f1 + + + qt.qt6.681.examples.qtquick3d + Examples for Qt 6.8.1 GPLv3 components (QtQuick3D) + Examples for Qt 6.8.1 GPLv3 components (QtQuick3D) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtquick3d-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtquick3d-examples-6.8.1.7z + + + 9ca1f955d70eb6f7393aa27286748285aca07345 + + + qt.qt6.681.examples.qtquick3dphysics + Examples for Qt 6.8.1 Quick: 3D Physics + Examples for Qt 6.8.1 Quick: 3D Physics + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtquick3dphysics-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtquick3dphysics-examples-6.8.1.7z + + + 41ac7fac2539f608740d53bd38a0d071973bb850 + + + qt.qt6.681.examples.qtquickeffectmaker + Examples for Qt 6.8.1 Quick Effect Maker + Examples for Qt 6.8.1 Quick Effect Maker + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtquickeffectmaker-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtquickeffectmaker-examples-6.8.1.7z + + + 0802085b796fe628a3dec8e44113d7a65d23f01e + + + qt.qt6.681.examples.qtremoteobjects + Examples for Qt Remote Objects + Examples for Qt Remote Objects + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtremoteobjects-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtremoteobjects-examples-6.8.1.7z + + + 8b73b8b06a38bebdd0f816c54acde285ebb8a914 + + + qt.qt6.681.examples.qtscxml + Examples for Qt 6.8.1 SCXML + Examples for Qt 6.8.1 SCXML + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtscxml-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtscxml-examples-6.8.1.7z + + + d5fea2cc1de580e8cb494482bd95a76e671cec47 + + + qt.qt6.681.examples.qtsensors + Examples for Qt 6.8.1 Sensors + Examples for Qt 6.8.1 Sensors + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtsensors-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtsensors-examples-6.8.1.7z + + + 80619be3af5400e3aaa77e8795ff7e9c9867e34a + + + qt.qt6.681.examples.qtserialbus + Examples for Qt SerialBus + Examples for Qt SerialBus + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtserialbus-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtserialbus-examples-6.8.1.7z + + + 83bb9f6e8133d23f3532094c523b23fcda9ce261 + + + qt.qt6.681.examples.qtserialport + Examples for Qt SerialPort + Examples for Qt SerialPort + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtserialport-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtserialport-examples-6.8.1.7z + + + 818cd0225c6d59bc2d3e193446d9a4fe9ca7b786 + + + qt.qt6.681.examples.qtspeech + Examples for Qt Speech (Technology Preview) + Examples for Qt Speech (Technology Preview) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtspeech-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtspeech-examples-6.8.1.7z + + + 1d5b06cf3dde72a7f9d7fa19a9b5c465923eabb2 + + + qt.qt6.681.examples.qtvirtualkeyboard + Examples for Qt 6.8.1 GPLv3 components (QtVirtualKeyboard) + Examples for Qt 6.8.1 GPLv3 components (QtVirtualKeyboard) + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtvirtualkeyboard-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtvirtualkeyboard-examples-6.8.1.7z + + + 02f3d01de7d0f573b994d855fe32f2aff4d5dab8 + + + qt.qt6.681.examples.qtwaylandcompositor + Examples for Qt 6.8.1 Qt Wayland Compositor + Examples for Qt 6.8.1 Qt Wayland Compositor + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtwayland-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtwayland-examples-6.8.1.7z + + + 8361434473240d72c6ac1de7950fac1e1447a795 + + + qt.qt6.681.examples.qtwebchannel + Examples for Qt 6.8.1 WebChannel + Examples for Qt 6.8.1 WebChannel + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtwebchannel-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtwebchannel-examples-6.8.1.7z + + + 35c012f0936397aacafcd2cce9d54d65b6c196e9 + + + qt.qt6.681.examples.qtwebsockets + Examples for Qt 6.8.1 WebSockets + Examples for Qt 6.8.1 WebSockets + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtwebsockets-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtwebsockets-examples-6.8.1.7z + + + bbd5e8c03c5de663b8c1bd2585f66a170b0c1a99 + + + qt.qt6.681.examples.qtwebview + Examples for Qt 6.8.1 WebView + Examples for Qt 6.8.1 WebView + 6.8.1-0-202411221531 + 2024-11-22 + true + 1 + qtwebview-examples-6.8.1.7z + + + + @TargetDir@/Examples/Qt-6.8.1 + qtwebview-examples-6.8.1.7z + + + f426b3d728b02d639db1b72f4530b4e329726ffd + + + qt.qt6.681.src + Sources + Qt 6.8.1 Source Components + 6.8.1-0-202411221531 + 2024-11-22 + 100 + qtdoc-everywhere-src-6.8.1.zip, qtwayland-everywhere-src-6.8.1.zip, qtbase-everywhere-src-6.8.1.zip, qtsvg-everywhere-src-6.8.1.zip, qtdeclarative-everywhere-src-6.8.1.zip, qttools-everywhere-src-6.8.1.zip, qt5compat-everywhere-src-6.8.1.zip, qtshadertools-everywhere-src-6.8.1.zip, qtquick3d-everywhere-src-6.8.1.zip, qtquick3dphysics-everywhere-src-6.8.1.zip, qtquickeffectmaker-everywhere-src-6.8.1.zip, qtquicktimeline-everywhere-src-6.8.1.zip, qttranslations-everywhere-src-6.8.1.zip, qt5-everywhere-src-6.8.1.zip, qt3d-everywhere-src-6.8.1.zip, qtactiveqt-everywhere-src-6.8.1.zip, qtcharts-everywhere-src-6.8.1.zip, qtcoap-everywhere-src-6.8.1.zip, qtconnectivity-everywhere-src-6.8.1.zip, qtdatavis3d-everywhere-src-6.8.1.zip, qtgraphs-everywhere-src-6.8.1.zip, qtgrpc-everywhere-src-6.8.1.zip, qthttpserver-everywhere-src-6.8.1.zip, qtimageformats-everywhere-src-6.8.1.zip, qtlanguageserver-everywhere-src-6.8.1.zip, qtlocation-everywhere-src-6.8.1.zip, qtlottie-everywhere-src-6.8.1.zip, qtmqtt-everywhere-src-6.8.1.zip, qtmultimedia-everywhere-src-6.8.1.zip, qtnetworkauth-everywhere-src-6.8.1.zip, qtopcua-everywhere-src-6.8.1.zip, qtpositioning-everywhere-src-6.8.1.zip, qtremoteobjects-everywhere-src-6.8.1.zip, qtscxml-everywhere-src-6.8.1.zip, qtsensors-everywhere-src-6.8.1.zip, qtserialbus-everywhere-src-6.8.1.zip, qtserialport-everywhere-src-6.8.1.zip, qtspeech-everywhere-src-6.8.1.zip, qtvirtualkeyboard-everywhere-src-6.8.1.zip, qtwebchannel-everywhere-src-6.8.1.zip, qtwebsockets-everywhere-src-6.8.1.zip, qtwebview-everywhere-src-6.8.1.zip + + + + @TargetDir@/6.8.1/Src/qtdoc + qtdoc-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtwayland + qtwayland-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtbase + qtbase-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtsvg + qtsvg-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtdeclarative + qtdeclarative-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qttools + qttools-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qt5compat + qt5compat-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtshadertools + qtshadertools-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtquick3d + qtquick3d-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtquick3dphysics + qtquick3dphysics-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtquickeffectmaker + qtquickeffectmaker-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtquicktimeline + qtquicktimeline-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qttranslations + qttranslations-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src + qt5-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qt3d + qt3d-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtactiveqt + qtactiveqt-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtcharts + qtcharts-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtcoap + qtcoap-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtconnectivity + qtconnectivity-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtdatavis3d + qtdatavis3d-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtgraphs + qtgraphs-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtgrpc + qtgrpc-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qthttpserver + qthttpserver-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtimageformats + qtimageformats-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtlanguageserver + qtlanguageserver-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtlocation + qtlocation-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtlottie + qtlottie-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtmqtt + qtmqtt-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtmultimedia + qtmultimedia-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtnetworkauth + qtnetworkauth-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtopcua + qtopcua-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtpositioning + qtpositioning-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtremoteobjects + qtremoteobjects-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtscxml + qtscxml-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtsensors + qtsensors-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtserialbus + qtserialbus-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtserialport + qtserialport-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtspeech + qtspeech-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtvirtualkeyboard + qtvirtualkeyboard-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtwebchannel + qtwebchannel-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtwebsockets + qtwebsockets-everywhere-src-6.8.1.zip + + + @TargetDir@/6.8.1/Src/qtwebview + qtwebview-everywhere-src-6.8.1.zip + + + 0c84c96f1e1a5aecfc92294ec9bf79e45e3039f0 + + 13ddd4824d23c22c4ad02409f8c7927ca5120a5a + 2024-11-22-1553_meta.7z + diff --git a/tests/test_list.py b/tests/test_list.py index edc4f56f..15d08241 100644 --- a/tests/test_list.py +++ b/tests/test_list.py @@ -208,13 +208,17 @@ def win_5152_sde_xml_file() -> str: return (Path(__file__).parent / "data" / "windows-5152-src-doc-example-update.xml").read_text("utf-8") -def win_5152_sde_expected(cmd_type: str, query_type: str) -> Set[str]: +def win_sde_expected(cmd_type: str, query_type: str, expect_out_file: str) -> Set[str]: assert cmd_type in ("src", "doc", "examples") assert query_type in ("archives", "modules") - _json = json.loads((Path(__file__).parent / "data/windows-5152-src-doc-example-expect.json").read_text("utf-8")) + _json = json.loads((Path(__file__).parent / "data" / expect_out_file).read_text("utf-8")) return set(_json[cmd_type][query_type]) +def win_5152_sde_expected(cmd_type: str, query_type: str) -> Set[str]: + return win_sde_expected(cmd_type, query_type, "windows-5152-src-doc-example-expect.json") + + @pytest.mark.parametrize( "cmd_type, host, version, expected", [ @@ -260,19 +264,82 @@ def test_list_src_doc_examples_modules( @pytest.mark.parametrize( - "command, expected", + "command, updates_file, url, expected", ( - ("list-src windows 5.15.2", win_5152_sde_expected("src", "archives")), - ("list-doc windows 5.15.2", win_5152_sde_expected("doc", "archives")), - ("list-example windows 5.15.2", win_5152_sde_expected("examples", "archives")), - ("list-doc windows 5.15.2 --modules", win_5152_sde_expected("doc", "modules")), - ("list-example windows 5.15.2 --modules", win_5152_sde_expected("examples", "modules")), + ( + "list-src windows 5.15.2", + "windows-5152-src-doc-example-update.xml", + re.compile(r"/windows_x86/desktop/qt5_5152_src_doc_examples/Updates\.xml$"), + win_5152_sde_expected("src", "archives"), + ), + ( + "list-doc windows 5.15.2", + "windows-5152-src-doc-example-update.xml", + re.compile(r"/windows_x86/desktop/qt5_5152_src_doc_examples/Updates\.xml$"), + win_5152_sde_expected("doc", "archives"), + ), + ( + "list-example windows 5.15.2", + "windows-5152-src-doc-example-update.xml", + re.compile(r"/windows_x86/desktop/qt5_5152_src_doc_examples/Updates\.xml$"), + win_5152_sde_expected("examples", "archives"), + ), + ( + "list-doc windows 5.15.2 --modules", + "windows-5152-src-doc-example-update.xml", + re.compile(r"/windows_x86/desktop/qt5_5152_src_doc_examples/Updates\.xml$"), + win_5152_sde_expected("doc", "modules"), + ), + ( + "list-example windows 5.15.2 --modules", + "windows-5152-src-doc-example-update.xml", + re.compile(r"/windows_x86/desktop/qt5_5152_src_doc_examples/Updates\.xml$"), + win_5152_sde_expected("examples", "modules"), + ), + ( + "list-src windows 6.8.1", + "all_os-681-src-doc-example-update.xml", + re.compile(r"/all_os/qt/qt6_681_(?:unix|windows)_line_endings_src/Updates\.xml$"), + win_sde_expected("src", "archives", "all_os-681-src-doc-example-expect.json"), + ), + ( + "list-doc windows 6.8.1", + "all_os-681-src-doc-example-update.xml", + re.compile(r"/all_os/qt/qt6_681_(?:unix|windows)_line_endings_src/Updates\.xml$"), + win_sde_expected("doc", "archives", "all_os-681-src-doc-example-expect.json"), + ), + ( + "list-example windows 6.8.1", + "all_os-681-src-doc-example-update.xml", + re.compile(r"/all_os/qt/qt6_681_(?:unix|windows)_line_endings_src/Updates\.xml$"), + win_sde_expected("examples", "archives", "all_os-681-src-doc-example-expect.json"), + ), + ( + "list-src all_os 6.8.1", + "all_os-681-src-doc-example-update.xml", + re.compile(r"/all_os/qt/qt6_681_(?:unix|windows)_line_endings_src/Updates\.xml$"), + win_sde_expected("src", "archives", "all_os-681-src-doc-example-expect.json"), + ), + ( + "list-doc all_os 6.8.1", + "all_os-681-src-doc-example-update.xml", + re.compile(r"/all_os/qt/qt6_681_(?:unix|windows)_line_endings_src/Updates\.xml$"), + win_sde_expected("doc", "archives", "all_os-681-src-doc-example-expect.json"), + ), + ( + "list-example all_os 6.8.1", + "all_os-681-src-doc-example-update.xml", + re.compile(r"/all_os/qt/qt6_681_(?:unix|windows)_line_endings_src/Updates\.xml$"), + win_sde_expected("examples", "archives", "all_os-681-src-doc-example-expect.json"), + ), ), ) -def test_list_src_doc_examples_cli(monkeypatch, capsys, win_5152_sde_xml_file, command: str, expected: Set[str]): +def test_list_src_doc_examples_cli( + monkeypatch, capsys, command: str, updates_file: str, url: re.Pattern, expected: Set[str] +): def mock_fetch(self, rest_of_url): - assert rest_of_url == "online/qtsdkrepository/windows_x86/desktop/qt5_5152_src_doc_examples/Updates.xml" - return win_5152_sde_xml_file + assert url.search(rest_of_url), f"Unexpected URL: {rest_of_url}" + return (Path(__file__).parent / "data" / updates_file).read_text("utf-8") monkeypatch.setattr(MetadataFactory, "fetch_http", mock_fetch)