Changeset View
Changeset View
Standalone View
Standalone View
contrib/devtools/test-security-check.py
#!/usr/bin/env python2 | #!/usr/bin/env python2 | ||||
# Copyright (c) 2015-2016 The Bitcoin Core developers | # Copyright (c) 2015-2016 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
''' | ''' | ||||
Test script for security-check.py | Test script for security-check.py | ||||
''' | ''' | ||||
from __future__ import division, print_function | from __future__ import division, print_function | ||||
import subprocess | import subprocess | ||||
import unittest | import unittest | ||||
def write_testcode(filename): | def write_testcode(filename): | ||||
with open(filename, 'w') as f: | with open(filename, 'w', encoding="utf8") as f: | ||||
f.write(''' | f.write(''' | ||||
#include <stdio.h> | #include <stdio.h> | ||||
int main() | int main() | ||||
{ | { | ||||
printf("the quick brown fox jumps over the lazy god\\n"); | printf("the quick brown fox jumps over the lazy god\\n"); | ||||
return 0; | return 0; | ||||
} | } | ||||
''') | ''') | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |