Skip to content
Snippets Groups Projects
Commit 9170a765 authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[tests] add non-regression test for macro with % in cpp extra args

also avoid accidental `*/` in FILTER command
parent 51c067ea
No related branches found
No related tags found
No related merge requests found
/* run.config*
FILTER: sed "s:/[^ ]*/cpp-command\.[^ ]*\.i:TMPDIR/FILE.i:g; s:$PWD/::; s: -m32::"
FILTER: sed "s:/[^ ]*[/]cpp-command\.[^ ]*\.i:TMPDIR/FILE.i:g; s:$PWD/::; s: -m32::"
OPT: -machdep x86_32 -no-autoload-plugins -cpp-frama-c-compliant -cpp-command "echo [\$(basename '%1') \$(basename '%1') \$(basename '%i') \$(basename '%input')] ['%2' '%2' '%o' '%output'] ['%args']"
OPT: -machdep x86_32 -no-autoload-plugins -cpp-frama-c-compliant -cpp-command "echo %%1 = \$(basename '%1') %%2 = '%2' %%args = '%args'"
OPT: -machdep x86_32 -no-autoload-plugins -cpp-frama-c-compliant -cpp-command "printf \"%s\n\" \"using \\% has no effect : \$(basename \"\%input\")\""
OPT: -machdep x86_32 -no-autoload-plugins -cpp-frama-c-compliant -cpp-command "echo %var is not an interpreted placeholder"
OPT: -machdep x86_32 -no-autoload-plugins -print-cpp-commands
OPT: -cpp-extra-args-per-file=@PTEST_FILE@:"-DPF=\\\"cp%02d_3f\\\"" -no-autoload-plugins @PTEST_FILE@ -print
*/
#include <stdio.h>
void printer(int i, float f) {
printf(PF, i, f);
}
int main() {
printer(1, 1.0);
}
[kernel] Parsing tests/syntax/cpp-command.c (with preprocessing)
/* Generated by Frama-C */
#include "errno.h"
#include "stdarg.h"
#include "stddef.h"
#include "stdio.h"
void printer(int i, float f)
{
printf("cp%02d_3f",i,(double)f);
return;
}
int main(void)
{
int __retres;
printer(1,(float)1.0);
__retres = 0;
return __retres;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment