Loading tests/assignment-1/a1-ex1.bats +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ setup() { } @test "[EXERCISE 1] File 'file1' exists" { bash -c "$(awk '/# EXERCISE 1$/{flag=1; next} /# EXERCISE/{flag=0} flag' ./commands.sh)" bash ./task-1.sh assert_file_exists './file1' } tests/assignment-1/a1-ex10.bats +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ setup() { } @test "[EXERCISE 10] Files 'testfile*' 'testfile*1' and 'testfile*2' were deleted from user folder" { bash -c "$(awk '/# EXERCISE 10$/{flag=1; next} /# EXERCISE/{flag=0} flag' ./commands.sh)" bash ./task-10.sh assert_file_not_exists './testfile*' assert_file_not_exists './testfile*1' Loading tests/assignment-1/a1-ex11.bats +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ setup() { } @test "[EXERCISE 11] Files 'file1' 'file2' 'file3' and 'file4' exist" { bash -c "$(awk '/# EXERCISE 11$/{flag=1; next} /# EXERCISE/{flag=0} flag' ./commands.sh)" bash ./task-11.sh assert_file_exists './file1' assert_file_exists './file2' Loading tests/assignment-1/a1-ex12.bats +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ setup() { } @test "[EXERCISE 12] Files 'file1' and 'file2' have all permissions for all users" { bash -c "$(awk '/# EXERCISE 12$/{flag=1; next} /# EXERCISE/{flag=0} flag' ./commands.sh)" bash ./task-12.sh assert_file_permission '777' './file1' assert_file_permission '777' './file2' Loading tests/assignment-1/a1-ex13.bats +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ setup() { } @test "[EXERCISE 13] Files 'file3' and 'file4' have read and write permissions for owner and no other permissions for others" { bash -c "$(awk '/# EXERCISE 13$/{flag=1; next} /# EXERCISE/{flag=0} flag' ./commands.sh)" bash ./task-13.sh # Check that owner has read/write permissions (6xx) file3_permissions=$(stat -c "%a" './file3') Loading Loading
tests/assignment-1/a1-ex1.bats +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ setup() { } @test "[EXERCISE 1] File 'file1' exists" { bash -c "$(awk '/# EXERCISE 1$/{flag=1; next} /# EXERCISE/{flag=0} flag' ./commands.sh)" bash ./task-1.sh assert_file_exists './file1' }
tests/assignment-1/a1-ex10.bats +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ setup() { } @test "[EXERCISE 10] Files 'testfile*' 'testfile*1' and 'testfile*2' were deleted from user folder" { bash -c "$(awk '/# EXERCISE 10$/{flag=1; next} /# EXERCISE/{flag=0} flag' ./commands.sh)" bash ./task-10.sh assert_file_not_exists './testfile*' assert_file_not_exists './testfile*1' Loading
tests/assignment-1/a1-ex11.bats +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ setup() { } @test "[EXERCISE 11] Files 'file1' 'file2' 'file3' and 'file4' exist" { bash -c "$(awk '/# EXERCISE 11$/{flag=1; next} /# EXERCISE/{flag=0} flag' ./commands.sh)" bash ./task-11.sh assert_file_exists './file1' assert_file_exists './file2' Loading
tests/assignment-1/a1-ex12.bats +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ setup() { } @test "[EXERCISE 12] Files 'file1' and 'file2' have all permissions for all users" { bash -c "$(awk '/# EXERCISE 12$/{flag=1; next} /# EXERCISE/{flag=0} flag' ./commands.sh)" bash ./task-12.sh assert_file_permission '777' './file1' assert_file_permission '777' './file2' Loading
tests/assignment-1/a1-ex13.bats +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ setup() { } @test "[EXERCISE 13] Files 'file3' and 'file4' have read and write permissions for owner and no other permissions for others" { bash -c "$(awk '/# EXERCISE 13$/{flag=1; next} /# EXERCISE/{flag=0} flag' ./commands.sh)" bash ./task-13.sh # Check that owner has read/write permissions (6xx) file3_permissions=$(stat -c "%a" './file3') Loading