From: mpi Date: Mon, 5 Feb 2024 15:18:19 +0000 (+0000) Subject: Adapt map regress test to cover associated arrays fixed in btrace.c r1.82. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b233a77e517353c8b3c7f5cf8de620a6ac26058a;p=openbsd Adapt map regress test to cover associated arrays fixed in btrace.c r1.82. From Christian Ludwig. --- diff --git a/regress/usr.sbin/btrace/map.bt b/regress/usr.sbin/btrace/map.bt index cf6fd7f3f16..1f725961fc8 100644 --- a/regress/usr.sbin/btrace/map.bt +++ b/regress/usr.sbin/btrace/map.bt @@ -1,6 +1,6 @@ BEGIN { - @map[8 - 1] = count(); + @map[8 - 1, "test"] = count(); printf("=> Print with one element\n"); print(@map); @@ -8,7 +8,7 @@ BEGIN printf("=> Print after zero:\n"); print(@map); - @map[7] = count(); + @map[7, "test"] = count(); @map[5] = 42; @map[3 + 1] = 9999; @map[897123] = 9997; @@ -17,12 +17,12 @@ BEGIN print(@map, @top); printf("=> Using printf:\n"); - printf("%d + %d\n", @map[4], @map[7]); + printf("%d + %d\n", @map[4], @map[7, "test"]); } END { - @map[7] = count(); + @map[7, "test"] = count(); printf("=> Print all map:\n"); print(@map); diff --git a/regress/usr.sbin/btrace/map.ok b/regress/usr.sbin/btrace/map.ok index 4bba4dae8b6..97db21fdff2 100644 --- a/regress/usr.sbin/btrace/map.ok +++ b/regress/usr.sbin/btrace/map.ok @@ -1,7 +1,7 @@ => Print with one element -@map[7]: 1 +@map[7, test]: 1 => Print after zero: -@map[7]: 0 +@map[7, test]: 0 => Print top 2: @map[4]: 9999 @map[897123]: 9997 @@ -11,5 +11,5 @@ @map[4]: 9999 @map[897123]: 9997 @map[5]: 42 -@map[7]: 2 +@map[7, test]: 2 => Print after clear: