#!/usr/bin/env python
# Copyright 2015 The html5ever Project Developers. See the
# COPYRIGHT file at the top-level directory of this distribution.
#
# Licensed under the Apache License, Version 2.0 or the MIT license
# , at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.
import re
import sys
REPLACEMENTS = {
'ok': '.',
'FAILED': 'F',
'ignored': 'I',
}
TEST_RESULT_RE = re.compile(
r'^test .* \.\.\. ({0})$'.format('|'.join(REPLACEMENTS.keys())))
def main():
while True:
line = sys.stdin.readline()
if len(line) is 0:
break
match = TEST_RESULT_RE.match(line)
if match:
sys.stdout.write(REPLACEMENTS[match.group(1)])
else:
sys.stdout.write(line)
sys.stdout.flush()
if __name__ == '__main__':
sys.exit(main())