Re: [PATCH v2] t4018: introduce test cases for the internal hunk header patterns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brandon Casey <drafnel@xxxxxxxxx> writes:

> diff --git a/t/t4018/ignore_global.cpp b/t/t4018/ignore_global.cpp
> new file mode 100644
> index 0000000..95e23bc
> --- /dev/null
> +++ b/t/t4018/ignore_global.cpp
> @@ -0,0 +1,19 @@
> +int WRONG_function_hunk_header_preceding_the_right_one (void)
> +{
> +	return 0;
> +}
> +
> +int RIGHT_function_hunk_header (void)
> +{
> +	printf("Hello, world\n");
> +	return 0;
> +}
> +
> +int WRONG_global_variable;
> +
> +int ChangeMe;
> +
> +int WRONG_function_hunk_header_following_the_right_one (void)
> +{
> +	return 0;
> +}

Shouldn't ChangeMe be inside function?

> diff --git a/t/t4018/simple.cpp b/t/t4018/simple.cpp
> new file mode 100644
> index 0000000..c96ad87
> --- /dev/null
> +++ b/t/t4018/simple.cpp
> @@ -0,0 +1,32 @@
> +/*
> + *  Test file for testing the internal hunk header patterns
> + *
> + *  The "RIGHT" hunk header function, the one that should appear on the
> + *  hunk header line, should be named "RIGHT_function_hunk_header" and
> + *  the body of this function should have an assignment that looks like
> + *
> + *     answer = 0

Shouldn't it be ChangeMe?

> + *
> + *  within it, deep enough so the lines of context do not include the
> + *  function name.
> + *
> + *  If the name of this file begins with "broken_", then it will be
> + *  interpreted as a pattern which does not work, but which should.
> + */

-- 
Jakub Narêbski
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]