File: gen-big-test-resource.py

package info (click to toggle)
gobject-introspection 1.84.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 72,336 kB
  • sloc: ansic: 562,269; python: 23,692; xml: 16,240; yacc: 1,711; perl: 1,624; sh: 1,139; lex: 510; cpp: 487; makefile: 182; javascript: 15; lisp: 1
file content (26 lines) | stat: -rw-r--r-- 721 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Generate a large text file to test compile
# the resulting code that contains a large (>65536 bytes)
# resource entry.  Just have 12 iterations of the following:
#
# -100 of each of the lowercase letters
# -100 of each of the uppercase letters
# -100 of the numbers 0 to 9
#
# See issue #1580

import string
import sys

if len(sys.argv) != 2:
    raise SystemExit("Usage: %s <output-file>" % sys.argv[0])

with open(sys.argv[1], "w", newline="\n") as f:
    for count in range(12):
        for c in string.ascii_lowercase:
            f.write("%s\n" % (c * 100))

        for c in string.ascii_uppercase:
            f.write("%s\n" % (c * 100))

        for i in range(10):
            f.write("%s\n" % (str(i) * 100))