Lines Matching full:size
14 SIZE=256 variable
33 # @size: bytes for bprm->buf line, including hashbang but not newline
40 # @fill: character to fill between @root and @target to reach @size bytes
41 # @newline: character to use as newline, not counted towards @size
43 def test(name, size, good=True, leading="", root="./", target="/perl", argument
52 remaining = size - len(hashbang) - len(leading) - len(root) - len(target) - len(arg)
111 test(name="too-big", size=SIZE+80, good=False)
112 # Path is right at max size, making it impossible to tell if it was truncated.
113 test(name="exact", size=SIZE, good=False)
115 test(name="exact-space", size=SIZE, good=False, leading=" ")
117 test(name="whitespace-too-big", size=SIZE+71, good=False, root="",
120 test(name="truncated", size=SIZE+17, good=False, leading=" " * 19)
122 test(name="empty", size=2, good=False, root="",
124 # Within size, but entirely spaces
125 test(name="spaces", size=SIZE-1, good=False, root="", fill=" ",
128 test(name="newline-prefix", size=SIZE-1, good=False, leading="\n",
135 test(name="test.pl", size=439, leading=" ",
138 # One byte under size, leaving newline visible.
139 test(name="one-under", size=SIZE-1)
140 # Two bytes under size, leaving newline visible.
141 test(name="two-under", size=SIZE-2)
142 # Exact size, but trailing whitespace visible instead of newline
143 test(name="exact-trunc-whitespace", size=SIZE, arg=" ")
144 # Exact size, but trailing space and first arg char visible instead of newline.
145 test(name="exact-trunc-arg", size=SIZE, arg=" f")
147 test(name="one-under-full-arg", size=SIZE-1, arg=" f")
149 test(name="one-under-no-nl", size=SIZE-1, newline="")
150 # Short read buffer by half buffer size.
151 test(name="half-under-no-nl", size=int(SIZE/2), newline="")
153 test(name="one-under-trunc-arg", size=SIZE-1, arg=" ")
155 test(name="one-under-leading", size=SIZE-1, leading=" ")
157 test(name="one-under-leading-trunc-arg", size=SIZE-1, leading=" ", arg=" ")
159 test(name="two-under-no-nl", size=SIZE-2, newline="")
160 test(name="two-under-trunc-arg", size=SIZE-2, arg=" ")
161 test(name="two-under-leading", size=SIZE-2, leading=" ")
162 test(name="two-under-leading-trunc-arg", size=SIZE-2, leading=" ", arg=" ")
164 test(name="two-under-no-nl", size=int(SIZE/2), newline="")
165 test(name="two-under-trunc-arg", size=int(SIZE/2), arg=" ")
166 test(name="two-under-leading", size=int(SIZE/2), leading=" ")
167 test(name="two-under-lead-trunc-arg", size=int(SIZE/2), leading=" ", arg=" ")