(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
plugin/
diagnostic-test-show-locus-color-line-numbers.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O -fdiagnostics-show-caret -fplugin-arg-diagnostic_plugin_test_show_locus-color -fdiagnostics-show-line-numbers" } */
       3  
       4  /* This is a collection of unittests for diagnostic_show_locus;
       5     see the overview in diagnostic_plugin_test_show_locus.c.
       6  
       7     In particular, note the discussion of why we need a very long line here:
       8  01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
       9     and that we can't use macros in this file.  */
      10  
      11  void test_multiline (void)
      12  {
      13  #if 0
      14    x = (first_function ()
      15         + second_function ()); /* { dg-warning "test" } */
      16  
      17  /* { dg-begin-multiline-output "" }
      18     14 |   x = (ESC[32mESC[KESC[32mfirst_function ()ESC[mESC[K
      19        |        ESC[32mESC[KESC[32m~~~~~~~~~~~~~~~~~ESC[mESC[K
      20     15 |        ESC[01;35mESC[KESC[35mESC[01;35m+ESC[mESC[K ESC[34mESC[KESC[34msecond_function ()ESC[mESC[K);
      21        |        ESC[01;35mESC[KESC[35mESC[01;35m^ESC[mESC[K ESC[34mESC[KESC[34m~~~~~~~~~~~~~~~~~~ESC[mESC[K
      22        |        ESC[01;35mESC[KESC[35mESC[01;35m|ESC[mESC[K
      23        |        ESC[01;35mESC[KESC[35mESC[01;35mlabelESC[mESC[K
      24     { dg-end-multiline-output "" } */
      25  #endif
      26  }