#!/bin/sh -efu

. ../helpers/alterator-lc-functions

file1=$(mktemp)
file2=$(mktemp)
file3=$(mktemp)

cat > "$file1" << EOF
  # comment
global_par1=123
global_par2="123"
global_par2="123"
    global_par3
other="x3"
 text1
 text2
#comment
EOF

liloconf_select_all_sections "$file1" > "$file2"

cat > "$file3" << EOF
<<<  # comment
global_par1=123
global_par2="123"
global_par2="123"
    global_par3>>>

<<<other="x3"
 text1
 text2
#comment>>>

EOF

diff "$file2" "$file3" || echo fail
rm -f -- "$file1" "$file2" "$file3"

