Add tests and test files with backslashes in INCLUDE paths.
This commit is contained in:
@@ -292,6 +292,14 @@ BOOST_AUTO_TEST_CASE( PATHS_has_global_scope ) {
|
||||
BOOST_CHECK_THROW( parser.parseFile( "testdata/parser/PATHSInIncludeInvalid.data", ParseContext() ), std::invalid_argument );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( PATHS_with_backslashes ) {
|
||||
Parser parser;
|
||||
ParseContext parseContext;
|
||||
|
||||
parseContext.update( ParseContext::PARSE_MISSING_INCLUDE , Opm::InputError::THROW_EXCEPTION);
|
||||
parser.parseFile( "testdata/parser/PATHSWithBackslashes.data", parseContext );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( handle_empty_title ) {
|
||||
const auto* input_deck = "RUNSPEC\n\n"
|
||||
"TITLE\n\n"
|
||||
|
||||
7
testdata/parser/PATHSWithBackslashes.data
vendored
Normal file
7
testdata/parser/PATHSWithBackslashes.data
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
INCLUDE
|
||||
'include\foobackslash.inc'
|
||||
/
|
||||
|
||||
INCLUDE
|
||||
'$FOOPATH\foo_target.inc'
|
||||
/
|
||||
3
testdata/parser/include/foobackslash.inc
vendored
Normal file
3
testdata/parser/include/foobackslash.inc
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
PATHS
|
||||
'FOOPATH' 'include\foopath' /
|
||||
/
|
||||
Reference in New Issue
Block a user