mirror of
https://github.com/Art051/it-tools.git
synced 2025-08-11 19:29:03 +00:00
Amended regex pattern for permission string, taken the prefix options from: https://askubuntu.com/tags/files/info
This commit is contained in:
@@ -279,6 +279,14 @@ describe('chmod-calculator', () => {
|
||||
describe('validateSymbolicInput', () => {
|
||||
describe('validateOrder', () => {
|
||||
it('should correctly validate the order of permissions', () => {
|
||||
expect(checkSymbolicString('-rwxrwxrwx')).toBe('');
|
||||
expect(checkSymbolicString('drwxrwxrwx')).toBe('');
|
||||
expect(checkSymbolicString('lrwxrwxrwx')).toBe('');
|
||||
expect(checkSymbolicString('brwxrwxrwx')).toBe('');
|
||||
expect(checkSymbolicString('crwxrwxrwx')).toBe('');
|
||||
expect(checkSymbolicString('srwxrwxrwx')).toBe('');
|
||||
expect(checkSymbolicString('prwxrwxrwx')).toBe('');
|
||||
|
||||
expect(checkSymbolicString('rwxrwxrwx')).toBe('');
|
||||
expect(checkSymbolicString('rw-r--r--')).toBe('');
|
||||
expect(checkSymbolicString('r-xr-xr-x')).toBe('');
|
||||
|
||||
Reference in New Issue
Block a user