diff options
Diffstat (limited to 'baremetal/shell')
-rw-r--r-- | baremetal/shell/gap-buffer.mu | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/baremetal/shell/gap-buffer.mu b/baremetal/shell/gap-buffer.mu index 0efd1358..56aa9098 100644 --- a/baremetal/shell/gap-buffer.mu +++ b/baremetal/shell/gap-buffer.mu @@ -319,6 +319,20 @@ fn test-gap-buffer-equal-from-start { check result, "F - test-gap-buffer-equal-from-start" } +fn test-gap-buffer-equal-fails { + # g = "aaa" + var _g: gap-buffer + var g/esi: (addr gap-buffer) <- address _g + initialize-gap-buffer g + var c/eax: grapheme <- copy 0x61/a + add-grapheme-at-gap g, c + add-grapheme-at-gap g, c + add-grapheme-at-gap g, c + # + var result/eax: boolean <- gap-buffer-equal? g, "aa" + check-not result, "F - test-gap-buffer-equal-fails" +} + fn copy-gap-buffer _src-ah: (addr handle gap-buffer), _dest-ah: (addr handle gap-buffer) { # obtain src-a, dest-a var src-ah/eax: (addr handle gap-buffer) <- copy _src-ah |