URI: 
       ed: Update TODO error list - sbase - suckless unix tools
  HTML git clone git://git.suckless.org/sbase
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 54f1f935c0024550d1715b173d662e9bf9ee2eb4
   DIR parent 77f8d7e5934c146d047c6c38b97067ae046268d9
  HTML Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
       Date:   Sat, 13 Dec 2025 13:29:17 +0100
       
       ed: Update TODO error list
       
       Diffstat:
         M TODO                                |      32 -------------------------------
         A tests/0021-ed.sh                    |      23 +++++++++++++++++++++++
         A tests/0022-ed.sh                    |       9 +++++++++
         A tests/0023-ed.sh                    |      19 +++++++++++++++++++
         A tests/0024-ed.sh                    |      33 +++++++++++++++++++++++++++++++
       
       5 files changed, 84 insertions(+), 32 deletions(-)
       ---
   DIR diff --git a/TODO b/TODO
       @@ -34,38 +34,6 @@ ed
          .
          s/$/\\
        
       -* cat <<EOF | ed
       -    0a
       -    int radix = 16;
       -    int Pflag;
       -    int Aflag;
       -    int vflag;
       -    int gflag;
       -    int uflag;
       -    int arflag;
       -
       -    .
       -    ?radix?;/^$/-s/^/static /
       -* cat <<EOF | ed
       -    0a
       -       Line
       -    .
       -    s# *##
       -* cat <<EOF | ed
       -    0a
       -    line
       -    .
       -    1g/^$/p
       -
       -* cat <<EOF | ed
       -    0a
       -    line1
       -    line2
       -    line3
       -    .
       -    g/^$/d
       -    ,p
       -
        * Editing huge files doesn't work well.
        
        
   DIR diff --git a/tests/0021-ed.sh b/tests/0021-ed.sh
       @@ -0,0 +1,23 @@
       +#!/bin/sh
       +
       +tmp=tmp.$$
       +
       +trap 'rm -f $tmp' EXIT
       +trap 'rm -f $tmp; kill -KILL $$' HUP INT TERM
       +
       +cat <<EOF >$tmp
       +1
       +2
       +3
       +EOF
       +
       +../ed -s /dev/null <<EOF | diff -u $tmp -
       +a
       +1
       +2
       +3
       +.
       +g/^$/d
       +,p
       +Q
       +EOF
   DIR diff --git a/tests/0022-ed.sh b/tests/0022-ed.sh
       @@ -0,0 +1,9 @@
       +#!/bin/sh
       +
       +../ed -s /dev/null <<EOF | wc -l | grep 0 >/dev/null
       +a
       +line
       +.
       +1g/^$/p
       +Q
       +EOF
   DIR diff --git a/tests/0023-ed.sh b/tests/0023-ed.sh
       @@ -0,0 +1,19 @@
       +#!/bin/sh
       +
       +tmp=tmp.$$
       +
       +trap 'rm -f $tmp' EXIT
       +trap 'rm -f $tmp; kill -KILL $$' HUP INT TERM
       +
       +cat <<EOF >$tmp
       +Line
       +EOF
       +
       +ed -s /dev/null <<EOF | diff -u $tmp -
       +0a
       +   Line
       +.
       +s# *##
       +,p
       +Q
       +EOF
   DIR diff --git a/tests/0024-ed.sh b/tests/0024-ed.sh
       @@ -0,0 +1,33 @@
       +#!/bin/sh
       +
       +tmp=tmp.$$
       +
       +trap 'rm -f $tmp' EXIT
       +trap 'rm -f $tmp; kill -KILL $$' HUP INT TERM
       +
       +cat <<EOF > $tmp
       +static int radix = 16;
       +static int Pflag;
       +static int Aflag;
       +static int vflag;
       +static int gflag;
       +static int uflag;
       +static int arflag;
       +
       +EOF
       +
       +ed -s /dev/null <<EOF | diff -u $tmp -
       +a
       +int radix = 16;
       +int Pflag;
       +int Aflag;
       +int vflag;
       +int gflag;
       +int uflag;
       +int arflag;
       +
       +.
       +?radix?;/^$/-s/^/static /
       +,p
       +Q
       +EOF