27 lines · plain
1## Basic test checking that update_cc_test_checks.py works as expected for2## functions with mangled names3# RUN: cp -f %S/Inputs/mangled_names.c %t.c && %update_cc_test_checks -v %t.c4# RUN: diff -u %t.c %S/Inputs/mangled_names.c.expected5## Check that running the script again does not change the result:6# RUN: %update_cc_test_checks -v %t.c7# RUN: diff -u %t.c %S/Inputs/mangled_names.c.expected8## Also try the --function-signature flag9# RUN: %update_cc_test_checks %t.c --function-signature10# RUN: diff -u %t.c %S/Inputs/mangled_names.c.funcsig.expected11## Running it again should implicitly add the function-signature flag due to UTC_ARGS:12# RUN: %update_cc_test_checks %t.c13# RUN: diff -u %t.c %S/Inputs/mangled_names.c.funcsig.expected14## Verify that running without the --function-signature flag removes the -SAME: lines:15## We have to remove the UTC_ARGS comment first:16# RUN: grep -v UTC_ARGS %t.c > %t-no-args.c17# RUN: %update_cc_test_checks %t-no-args.c18# RUN: diff -u %t-no-args.c %S/Inputs/mangled_names.c.expected19## Also try --version 220# RUN: %update_cc_test_checks %t.c --function-signature --version 221# RUN: diff -u %t.c %S/Inputs/mangled_names.c.funcsig.v2.expected22## Restore the original file without --function-signature and check that23## --version 2 will implicitly enable it.24# RUN: cp -f %S/Inputs/mangled_names.c %t.c25# RUN: %update_cc_test_checks %t.c --version 226# RUN: diff -u %t.c %S/Inputs/mangled_names.c.v2.expected27