summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorXavier Defrang <xavier.defrang@gmail.com>2022-01-22 16:34:09 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-01-24 07:50:32 +0000
commit070d70848fc3783dee1bd088ebe03e93a6e86c63 (patch)
tree02613368b518ce93f0699268c1f81d659afd9584 /Tests
parent30f58de800508c3e3c9580e759e9c472dcbec15b (diff)
downloadserenity-070d70848fc3783dee1bd088ebe03e93a6e86c63.zip
LibCore: Improve handling of parsing errors in FilePermissionsMask
Diffstat (limited to 'Tests')
-rw-r--r--Tests/LibCore/TestLibCoreFilePermissionsMask.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/LibCore/TestLibCoreFilePermissionsMask.cpp b/Tests/LibCore/TestLibCoreFilePermissionsMask.cpp
index 20f1e9899e..60cedb6d51 100644
--- a/Tests/LibCore/TestLibCoreFilePermissionsMask.cpp
+++ b/Tests/LibCore/TestLibCoreFilePermissionsMask.cpp
@@ -74,15 +74,19 @@ TEST_CASE(file_permission_mask_from_symbolic_notation)
mask = Core::FilePermissionsMask::from_symbolic_notation("z+rw"sv);
EXPECT(mask.is_error());
+ EXPECT(mask.error().string_literal().starts_with("invalid class"));
mask = Core::FilePermissionsMask::from_symbolic_notation("u*rw"sv);
EXPECT(mask.is_error());
+ EXPECT(mask.error().string_literal().starts_with("invalid operation"));
mask = Core::FilePermissionsMask::from_symbolic_notation("u+rz"sv);
EXPECT(mask.is_error());
+ EXPECT(mask.error().string_literal().starts_with("invalid symbolic permission"));
mask = Core::FilePermissionsMask::from_symbolic_notation("u+rw;g+rw"sv);
EXPECT(mask.is_error());
+ EXPECT(mask.error().string_literal().starts_with("invalid symbolic permission"));
}
TEST_CASE(file_permission_mask_parse)