2017-08-22 07:25:50 +08:00
|
|
|
RUN: %cpp_compiler %S/FlagsTest.cpp -o %t-FlagsTest
|
2017-10-13 09:12:23 +08:00
|
|
|
RUN: %t-FlagsTest -runs=10 -foo_bar=1 2>&1 | FileCheck %s --check-prefix=FOO_BAR
|
2017-08-22 07:25:50 +08:00
|
|
|
FOO_BAR: WARNING: unrecognized flag '-foo_bar=1'; use -help=1 to list all flags
|
|
|
|
FOO_BAR: BINGO
|
|
|
|
|
2017-10-13 09:12:23 +08:00
|
|
|
RUN: %t-FlagsTest -runs=10 --max_len=100 2>&1 | FileCheck %s --check-prefix=DASH_DASH
|
2017-08-22 07:25:50 +08:00
|
|
|
DASH_DASH: WARNING: did you mean '-max_len=100' (single dash)?
|
|
|
|
DASH_DASH: INFO: A corpus is not provided, starting from an empty corpus
|
|
|
|
|
|
|
|
RUN: %t-FlagsTest -help=1 2>&1 | FileCheck %s --check-prefix=NO_INTERNAL
|
|
|
|
NO_INTERNAL-NOT: internal flag
|
|
|
|
|
2017-10-13 09:12:23 +08:00
|
|
|
RUN: %t-FlagsTest --foo-bar -runs=10 -ignore_remaining_args=1 --baz -help=1 test 2>&1 | FileCheck %s --check-prefix=PASSTHRU
|
2017-08-22 07:25:50 +08:00
|
|
|
PASSTHRU: BINGO --foo-bar --baz -help=1 test
|
|
|
|
|
|
|
|
RUN: mkdir -p %t/T0 %t/T1
|
2017-09-16 06:29:20 +08:00
|
|
|
RUN: echo z > %t/T1/z
|
2017-10-13 09:12:23 +08:00
|
|
|
RUN: %t-FlagsTest -runs=10 --foo-bar -merge=1 %t/T0 %t/T1 -ignore_remaining_args=1 --baz -help=1 test 2>&1 | FileCheck %s --check-prefix=PASSTHRU-MERGE
|
2017-08-22 07:25:50 +08:00
|
|
|
PASSTHRU-MERGE: BINGO --foo-bar --baz -help=1 test
|