summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtattributionsscanner
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2020-07-16 14:28:01 +0200
committerKai Koehne <kai.koehne@qt.io>2020-07-24 10:33:55 +0200
commit4d3c39155f5cf793370f5bafbcd2445bf4a5504b (patch)
tree59ab19dbb90126f632b27c76f8605acad042f3a2 /tests/auto/qtattributionsscanner
parentdb87f5b27ce02e51b0e38aaa8473a40b0d87094a (diff)
qtattributionsscanner: Add property CopyrightFile
JSON doesn't really support linebreaks in strings. So far we do allow them in qt_attribution.json files though because Qt's JSON parser does support them. One of the fields most often affected by this is "Copyright". Allowing users to store multiple copyright lines in a separate file is an easy way to deal with this. Change-Id: I9578906f0c1cac0cfca007813feb7e926e75c730 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'tests/auto/qtattributionsscanner')
-rw-r--r--tests/auto/qtattributionsscanner/testdata/good/expected.json4
-rw-r--r--tests/auto/qtattributionsscanner/testdata/good/minimal/expected.json7
-rw-r--r--tests/auto/qtattributionsscanner/testdata/good/variants/expected.json1
-rw-r--r--tests/auto/qtattributionsscanner/testdata/good/variants/qt_attribution_test.json2
-rw-r--r--tests/auto/qtattributionsscanner/testdata/warnings/incomplete/expected.json11
-rw-r--r--tests/auto/qtattributionsscanner/testdata/warnings/unknown/expected.json11
6 files changed, 25 insertions, 11 deletions
diff --git a/tests/auto/qtattributionsscanner/testdata/good/expected.json b/tests/auto/qtattributionsscanner/testdata/good/expected.json
index 244687192..d910e6165 100644
--- a/tests/auto/qtattributionsscanner/testdata/good/expected.json
+++ b/tests/auto/qtattributionsscanner/testdata/good/expected.json
@@ -1,6 +1,7 @@
[
{
"Copyright": "",
+ "CopyrightFile": "",
"Description": "Hello world!\nLine 2",
"DownloadLocation": "",
"Files": "",
@@ -21,6 +22,7 @@
},
{
"Copyright": "Copyright",
+ "CopyrightFile": "",
"Description": "Multi\nLine\nDescription",
"DownloadLocation": "www.qt.io/1.0",
"Files": "",
@@ -41,6 +43,7 @@
},
{
"Copyright": "Copyright",
+ "CopyrightFile": "",
"Description": "",
"DownloadLocation": "",
"Files": "",
@@ -61,6 +64,7 @@
},
{
"Copyright": "",
+ "CopyrightFile": "%{PWD}/variants/COPYRIGHT.txt",
"Description": "",
"DownloadLocation": "",
"Files": "",
diff --git a/tests/auto/qtattributionsscanner/testdata/good/minimal/expected.json b/tests/auto/qtattributionsscanner/testdata/good/minimal/expected.json
index 8d9a5a31f..fcde8f084 100644
--- a/tests/auto/qtattributionsscanner/testdata/good/minimal/expected.json
+++ b/tests/auto/qtattributionsscanner/testdata/good/minimal/expected.json
@@ -1,7 +1,10 @@
[
{
"Copyright": "Copyright",
+ "CopyrightFile": "",
"Description": "",
+ "DownloadLocation": "",
+ "Files": "",
"Homepage": "",
"Id": "minimal",
"License": "License",
@@ -10,13 +13,11 @@
"Name": "Minimal",
"PackageComment": "",
"Path": "%{PWD}",
- "Files": "",
"QDocModule": "qtest",
"QtParts": [
"libs"
],
"QtUsage": "Usage",
- "Version": "",
- "DownloadLocation": ""
+ "Version": ""
}
]
diff --git a/tests/auto/qtattributionsscanner/testdata/good/variants/expected.json b/tests/auto/qtattributionsscanner/testdata/good/variants/expected.json
index 5300c6297..10a339175 100644
--- a/tests/auto/qtattributionsscanner/testdata/good/variants/expected.json
+++ b/tests/auto/qtattributionsscanner/testdata/good/variants/expected.json
@@ -1,6 +1,7 @@
[
{
"Copyright": "",
+ "CopyrightFile": "%{PWD}/COPYRIGHT.txt",
"Description": "",
"DownloadLocation": "",
"Files": "",
diff --git a/tests/auto/qtattributionsscanner/testdata/good/variants/qt_attribution_test.json b/tests/auto/qtattributionsscanner/testdata/good/variants/qt_attribution_test.json
index 072523114..1d8b587d9 100644
--- a/tests/auto/qtattributionsscanner/testdata/good/variants/qt_attribution_test.json
+++ b/tests/auto/qtattributionsscanner/testdata/good/variants/qt_attribution_test.json
@@ -5,5 +5,7 @@
"QDocModule": "qtest",
"QtUsage": "Usage",
"License": "License",
+
+ "CopyrightFile": "COPYRIGHT.txt",
"LicenseFiles": [ "LICENSE1.txt", "LICENSE2.txt" ]
}
diff --git a/tests/auto/qtattributionsscanner/testdata/warnings/incomplete/expected.json b/tests/auto/qtattributionsscanner/testdata/warnings/incomplete/expected.json
index fa56f2976..77b77b44c 100644
--- a/tests/auto/qtattributionsscanner/testdata/warnings/incomplete/expected.json
+++ b/tests/auto/qtattributionsscanner/testdata/warnings/incomplete/expected.json
@@ -1,7 +1,10 @@
[
{
"Copyright": "",
+ "CopyrightFile": "",
"Description": "",
+ "DownloadLocation": "",
+ "Files": "",
"Homepage": "",
"Id": "",
"License": "",
@@ -10,11 +13,11 @@
"Name": "",
"PackageComment": "",
"Path": "%{PWD}",
- "Files": "",
"QDocModule": "",
- "QtParts": [ "libs" ],
+ "QtParts": [
+ "libs"
+ ],
"QtUsage": "",
- "Version": "",
- "DownloadLocation": ""
+ "Version": ""
}
]
diff --git a/tests/auto/qtattributionsscanner/testdata/warnings/unknown/expected.json b/tests/auto/qtattributionsscanner/testdata/warnings/unknown/expected.json
index 18c1055f2..a87917eba 100644
--- a/tests/auto/qtattributionsscanner/testdata/warnings/unknown/expected.json
+++ b/tests/auto/qtattributionsscanner/testdata/warnings/unknown/expected.json
@@ -1,7 +1,10 @@
[
{
"Copyright": "Copyright",
+ "CopyrightFile": "",
"Description": "",
+ "DownloadLocation": "",
+ "Files": "",
"Homepage": "",
"Id": "unknown",
"License": "License",
@@ -10,11 +13,11 @@
"Name": "Unknown",
"PackageComment": "",
"Path": "%{PWD}",
- "Files": "",
"QDocModule": "qtest",
- "QtParts": [ "libs" ],
+ "QtParts": [
+ "libs"
+ ],
"QtUsage": "Usage",
- "Version": "",
- "DownloadLocation": ""
+ "Version": ""
}
]