>>> from test_ import process_file
>>> import os
>>> os.environ['COLUMNS'] = '80'

>>> process_file('arch/zx48k/arrbase1.bas', ['-q', '-S', '-O --mmap arrbase1.map'])
usage: zxbc.py [-h] [-d] [-O OPTIMIZE] [-o OUTPUT_FILE]
               [-T | -t | -A | -E | --parse-only | -f {asm,bin,ir,sna,tap,tzx,z80}]
               [-B] [-a] [-S ORG] [-e STDERR] [--array-base ARRAY_BASE]
               [--string-base STRING_BASE] [-Z] [-H HEAP_SIZE]
               [--heap-address HEAP_ADDRESS] [--debug-memory] [--debug-array]
               [--strict-bool] [--enable-break] [--explicit] [-D DEFINES]
               [-M MEMORY_MAP] [-i] [-I INCLUDE_PATH] [--strict]
               [--headerless] [--version] [--append-binary APPEND_BINARY]
               [--append-headless-binary APPEND_HEADLESS_BINARY] [-N]
               [--arch ARCH] [--expect-warnings EXPECT_WARNINGS]
               [-W DISABLE_WARNING] [+W ENABLE_WARNING] [--hide-warning-codes]
               [-F CONFIG_FILE] [--save-config SAVE_CONFIG]
               [--opt-strategy {size,speed,auto}]
               PROGRAM
zxbc.py: error: Option --asm and --mmap cannot be used together

>>> process_file('arch/zx48k/arrbase1.bas', ['-q', '-S', '-O -D EMPTY_MACRO'])

>>> process_file('asm/use_zxnext_asm.bas')

>>> process_file('asm/no_zxnext.asm')
no_zxnext.asm:8: error: Syntax error. Unexpected token 'D' [D]
no_zxnext.asm:9: error: Syntax error. Unexpected token 'A' [A]
no_zxnext.asm:12: error: Syntax error. Unexpected token '513' [INTEGER]
no_zxnext.asm:14: error: Syntax error. Unexpected token 'BC' [BC]
no_zxnext.asm:17: error: Syntax error. Unexpected token '17185' [INTEGER]
no_zxnext.asm:19: error: Syntax error. Unexpected token '51' [INTEGER]
no_zxnext.asm:23: error: Syntax error. Unexpected token '119' [INTEGER]
no_zxnext.asm:29: error: Syntax error. Unexpected token 'C' [C]

>>> process_file('asm/no_zxnext.asm', ['-q', '-S', '-O --zxnext'])

>>> process_file('asm/zxnext_all.asm')

>>> process_file('arch/zx48k/define_val.bas', ['-q', '-S', '-O -D MACRO=VALUE'])
>>> process_file('arch/zx48k/define_val.bas', ['-q', '-S', '-O -D MACRO'])
define_val.bas:4: error: "MACRO should be VALUE"

>>> process_file('arch/zx48k/tap_include_asm_error.bas', ['-q', '-S'])
extra_chars.bas:3: error: illegal character '`'
extra_chars.bas:4: error: illegal character '#'

>>> process_file('arch/zx48k/61.bas', ['-q', '-S', '-O --sinclair', '-O --expect-warnings 999'])
