The PVE::Filesystem module implements filesystem manipulation
operations. Currently, this is limited to two wrapper functions, but
in the future anything that concernts itself with altering the
filesystem should be added to it.
This module can be seen as the "complement" to PVE::Path -- while
PVE:
Add cases for both functions, as they're each other's opposite.
Signed-off-by: Max Carrara
---
Changes v1 --> v2:
* NEW: Split from patch 02
test/Path/Makefile | 1 +
test/Path/path_is_absolute_relative_tests.pl | 122 +++
2 files changed, 123 inser
Signed-off-by: Max Carrara
---
Changes v1 --> v2:
* NEW: Split from patch 02
test/Path/Makefile | 1 +
test/Path/path_components_tests.pl | 159 +
2 files changed, 160 insertions(+)
create mode 100755 test/Path/path_components_tests.pl
diff --git
What's important to note is that among the cases added are also some
that specifically account for Perl's File::Spec->canonpath treating
paths consisting of a single component that is neither "/" or "." as
the same. This means that e.g. "foo" and "./foo" are both the same
(canonpath returns "foo").
Add these tests solely to ensure that the behaviour of path_normalize
stays consistent / stable in case we ever decide to provide our own
implementation instead of wrapping File::Spec->canonpath().
Signed-off-by: Max Carrara
---
Changes v1 --> v2:
* NEW: Split from patch 02
test/Path/Makefile
On Thu Dec 19, 2024 at 7:31 PM CET, Max Carrara wrote:
> Introduce and Package PVE::Path & PVE::Filesystem
> =
>
Superseded by:
https://lore.proxmox.com/pve-devel/20241220185207.519912-1-m.carr...@proxmox.com/
_
Signed-off-by: Max Carrara
---
Changes v1 --> v2:
* NEW: Split from patch 02
test/Path/Makefile | 1 +
test/Path/path_push_tests.pl | 159 +++
2 files changed, 160 insertions(+)
create mode 100755 test/Path/path_push_tests.pl
diff --git a/test/Path
Add tests for the functions path_file_name, path_file_prefix,
path_file_suffix and path_file_suffixes as well as their path_with_*
counterparts.
The cases defined here are a bit more elaborate than the others,
because manipulating file names specifically is more insidious as one
might think at fir
.. of PVE::Path.
Each function has its test cases defined separately to avoid running
unnecessary tests / repeating equivalent tests for certain things.
Signed-off-by: Max Carrara
---
Changes v1 --> v2:
* NEW: Split from patch 02
test/Path/Makefile | 1 +
test/Path/path_com
The PVE::Path module concerns itself with file / directory path
operations, like getting the parent directory of a path, extracting
the file name of a path, splitting a path into its individual
components, joining path components together, comparing paths, and so
on.
This module is added here in o
Add the test/Path directory as well as test/Path/Makefile, containing
the scaffolding for tests regarding PVE::Path.
Include test/Path as subdirectory in test/Makefile, so
test/Path/Makefile runs when the other tests run, too.
Signed-off-by: Max Carrara
---
Changes v1 --> v2:
* NEW: Split from
This package contains both PVE::Path and PVE::Filesystem and is added
in order to split off those two modules from the rest of
libpve-common-perl from the get-go.
Both modules are provided in one package because chances are, if one
needs stuff from one module, they'll need stuff from the other mod
Add not just tests for the path_join function alone, but also a
separate test subroutine that checks whether a joined path remains the
same after splitting (with path_components) and joining it a second
time.
Because the path doesn't strictly have to be the *same string* after
it is split and join
Introduce and Package PVE::Path & PVE::Filesystem - v2
==
Notable Changes Since v1
Incorporate Thomas's feedback [1] as much as possible.
I was probably too eager to push this out yesterday and did notice many
spots whe
On Thu Dec 19, 2024 at 8:08 PM CET, Thomas Lamprecht wrote:
> Am 19.12.24 um 19:31 schrieb Max Carrara:
> > This commit adds a plethora of parameterized tests for all functions
> > of PVE::Path (except aliases). This surmounts to 1050 tests being run
> > in total. Some of these tests might perhaps
15 matches
Mail list logo