28 Commits (319a720d1b78439082463358d2496eacf653999a)

Author SHA1 Message Date
Adriaan de Groot 319a720d1b [libcalamares Expand tests 4 years ago
Adriaan de Groot b144d81979 [libcalamares] Fix up smart-string-truncation
- off-by-one when source ends with a newline
- lastNewLine was being calculated as a left-index into the string,
  then used as a count-from-right
4 years ago
Adriaan de Groot 3be360e433 [libcalamares] Add tests to string truncation
- check that basic manipulations succeed
- trailing-lines selection fails, though
4 years ago
Adriaan de Groot f4133a97db [libcalamares] Make test a bit more verbose (before failing) 4 years ago
Adriaan de Groot fa7d2bda16 [libcalamares] Misplaced space in a test-filename 4 years ago
Adriaan de Groot a2180936ef CI: apply coding style across the entire codebase again 5 years ago
Adriaan de Groot 1cd9b93a22 REUSE: Giant boilerplate cleanup
- point to main Calamares site in the 'part of' headers instead
  of to github (this is the "this file is part of Calamares"
  opening line for most files).
- remove boilerplate from all source files, CMake modules and completions,
  this is the 3-paragraph summary of the GPL-3.0-or-later, which has
  a meaning entirely covered by the SPDX tag.
5 years ago
Adriaan de Groot 2ac518d8b9 [libcalamares] Change in stringlist extraction also changes single-string 5 years ago
Adriaan de Groot 41e2de85b1 [libcalamares] Fix up test -- 'lam' isn't supposed to be in the loaded data 5 years ago
Adriaan de Groot e55def87e9 [libcalamares] Test for Variant methods
In advance of PR #1491, test loading and stringlist extraction.

- from code, extraction works "normally"
- for YAML data, the stringlist isn't actually a stringlist
5 years ago
Adriaan de Groot 117859082e [libcalamares] Merge Tests.h into Tests.cpp
- no real need for separate file in the utils/ tests
5 years ago
Adriaan de Groot 31cfdf926c [libcalamares] Apply SPDX to utils/ 5 years ago
Adriaan de Groot 0de98fe4c1 [libcalamares] Expand YAML testing a little
- load/save of a stringlist seems to work
5 years ago
Adriaan de Groot b5c0158ec2 [libcalamares] Some if-method-exists trickery
This builds some machinery so that we can create
a detector for member-functions (methods) named <whatever>.
Use the macro to build the machinery:

DECLARE_HAS_METHOD(myFunction)

then after that,

has_myFunction<T>

is either std::true_type or std::false_type
depending on whether T has a method myFunction.
5 years ago
Adriaan de Groot 7b6ff8dd37 [libcalamares] Minor tests for parts of RAII 5 years ago
Callum Farmer 0c4dc71d5c [libcalamares] Update SPDX identifiers.
Update CppJob.h

Update CalamaresConfig.h.in

Update DllMacro.h

Update GlobalStorage.cpp

Update GlobalStorage.h

Update Job.cpp

Update Job.h

Update JobExample.cpp

Update JobExample.h

Update JobQueue.cpp

Update CalamaresConfig.h.in

Update CppJob.cpp

Update CppJob.h

Update DllMacro.h

Update GlobalStorage.cpp

Update GlobalStorage.h

Update Job.cpp

Update Job.h

Update JobExample.cpp

Update JobExample.h

Update JobQueue.h

Update ProcessJob.cpp

Update ProcessJob.h

Update PythonHelper.cpp

Update PythonJob.cpp

Update PythonJob.h

Update PythonHelper.h

Update PythonJobApi.cpp

Update PythonJobApi.h

Update Settings.cpp

Update Settings.h

Update GeoIPJSON.cpp

Update GeoIPJSON.h

Update GeoIPTests.cpp

Update GeoIPTests.h

Update GeoIPXML.cpp

Update GeoIPXML.h

Update Handler.cpp

Update Handler.h

Update Interface.cpp

Update Interface.h

Update test_geoip.cpp

Update CountryData_p.cpp

Update Label.cpp

Update Label.h

Update LabelModel.cpp

Update LabelModel.h

Update CountryData_p.cpp

Update CountryData_p.cpp

Update Lookup.cpp

Update Lookup.h

Update Tests.cpp

Update Tests.h

Update TimeZone.cpp

Update TimeZone.h

Update TranslatableConfiguration.cpp

Update TranslatableConfiguration.h

Update ZoneData_p.cxxtr

Update cldr-extractor.py

Update zone-extractor.py

Update Actions.h

Update Actions.h

Update Descriptor.h

Update InstanceKey.cpp

Update Module.cpp

Update Module.h

Update Requirement.cpp

Update RequirementsChecker.h

Update RequirementsModel.cpp

Update RequirementsModel.h

Update Tests.cpp

Update Manager.cpp

Update Manager.h

Update Tests.cpp

Update FileSystem.cpp

Update FileSystem.h

Update KPMManager.cpp

Update KPMManager.h

Update KPMTests.cpp

Update FileSystem.cpp

Update FileSystem.cpp

Update FileSystem.h

Update KPMManager.cpp

Update KPMManager.h

Update Mount.cpp

Update Mount.h

Update PartitionIterator.cpp

Update PartitionIterator.h

Update PartitionIterator.h

Update PartitionQuery.cpp

Update PartitionQuery.h

Update PartitionSize.cpp

Update PartitionSize.h

Update Sync.cpp

Update Sync.h

Update Tests.cpp

Update Tests.h

Update BoostPython.h

Update CalamaresUtilsSystem.cpp

Update CalamaresUtilsSystem.h

Update CommandList.cpp

Update CommandList.h

Update Dirs.cpp

Update Dirs.h

Update Entropy.cpp

Update Entropy.h

Update Entropy.cpp

Update Logger.cpp

Update Logger.h

Update NamedEnum.h

Update NamedSuffix.h

Update PluginFactory.cpp

Update PluginFactory.h

Update RAII.h

Update RAII.h

Update Retranslator.cpp

Update Retranslator.h

Update String.cpp

Update String.h

Update TestPaths.cpp

Update Tests.cpp

Update Tests.h

Update UMask.cpp

Update UMask.h

Update Units.h

Update Variant.cpp

Update Variant.h

Update Yaml.cpp

Update Yaml.h

Update moc-warnings.h
5 years ago
Adriaan de Groot c6463a30ea [libcalamares] Be far more detailed in comparing maps
- just comparing a==b (both QVariantMap) gives a
  not-so-informative message, so go through the keys looking
  for differences.
5 years ago
Adriaan de Groot 39cc43f26b [libcalamares] Fix tests
- QCOMPARE() is sensitive to differing types in actual and expected,
  and uchar and int (and mode_t and int) are different.
5 years ago
Adriaan de Groot a11280b427 [libcalamares] Expand tests for printable entropy 5 years ago
Adriaan de Groot daa5b804b3 [libcalamares] Split paths-tests into own test executable
- Since these tests all want a system object, and a GS
   with a sensible setup, give them one with its own initTestCase().

This could have been done with one executable, running tests from
multiple classes, but there's not much overall benefit there.
5 years ago
Adriaan de Groot 15bca702c1 [libcalamares] Add tests for path functions (part 1) 5 years ago
Adriaan de Groot e56948cefa [libcalamares] Fix tests (cell is the lower unicode byte) 5 years ago
Adriaan de Groot be0831ee11 [libcalamares] Add printable-entropy (e.g. for password salt) 5 years ago
Adriaan de Groot 8947f9c00c [libcalamares] Test the Entropy service 5 years ago
Adriaan de Groot 66ee6ac673 [libcalamares] Fix tests for umask != 022
- My usual test environment has umask set to 022, but on one dev
   box it is 002, leading to test failures (which show the test
   was bad, not that the umask-setting code is bad)
6 years ago
Adriaan de Groot 41173360a7 [libcalamares] We're just testing file modes, not whole int range 6 years ago
Adriaan de Groot aa3f909be7 [libcalamares] Tests for UMask handling 6 years ago
Adriaan de Groot 0685e3a96c [libcalamares] Move tests of the utils classes into utils/
- while here, adjust include paths (to changed dir)
 - while here, apply new code formatting
6 years ago