ref: 717df14acac498bfb4496066a60c1ae83e93d9b7
parent: 2d24dea30ee375b9f0e0690e544c5feccff26cb8
author: Ori Bernstein <[email protected]>
date: Sun Nov 6 00:10:01 EST 2022
patch: test preservation of permissions.
--- a/cmd/patch/patch.rc
+++ b/cmd/patch/patch.rc
@@ -24,8 +24,16 @@
test ! -f delete.out
rm -f multifile^(1 2)^.out
+chmod 640 multifile1.in
+chmod 400 multifile2.in
patch multifile.patch
check multifile1.out multifile1.expected
check multifile2.out multifile2.expected
+
+if(! ~ `{walk -ex multifile1.out} --rw-r-----)
+ exit misperm1
+if(! ~ `{walk -ex multifile2.out} --rw-------)
+ exit misperm2
+
status=()