Set GCC flags appropriately for older versions

This commit is contained in:
w0rp
2017-04-29 20:00:29 +01:00
parent dfb10f1db2
commit 2c7d14809d
3 changed files with 34 additions and 10 deletions

View File

@@ -66,3 +66,14 @@ Execute(GCC errors from included files should be parsed correctly):
\ ' other_bad_type y;',
\ ' ^',
\ ])
Execute(GCC versions should be parsed correctly):
AssertEqual [4, 9, 1], ale#handlers#gcc#ParseGCCVersion([
\ 'g++ (GCC) 4.9.1 20140922 (Red Hat 4.9.1-10)',
\])
AssertEqual [4, 8, 4], ale#handlers#gcc#ParseGCCVersion([
\ 'gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4',
\ 'Copyright (C) 2013 Free Software Foundation, Inc.',
\ 'This is free software; see the source for copying conditions. There is NO',
\ 'warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.',
\])