gcc/testsuite/gnat.dg/fixed_delete.adb
raw| 1 | -- { dg-do run } |
| 2 | |
| 3 | with Ada.Text_IO; use Ada.Text_IO; |
| 4 | with Ada.Strings.Fixed; use Ada.Strings.Fixed; |
| 5 | |
| 6 | procedure Fixed_Delete is |
| 7 | Str : String := "a"; |
| 8 | Str1 : String := Replace_Slice (Str, 2, 2, ""); |
| 9 | Str2 : String := Delete (Str, 2, 2); |
| 10 | begin |
| 11 | if Str1 /= "a" then |
| 12 | raise Program_Error; |
| 13 | end if; |
| 14 | if Str2 /= "a" then |
| 15 | raise Program_Error; |
| 16 | end if; |
| 17 | end Fixed_Delete; |