--- /dev/null
+#!/usr/bin/env bash
+
+# This file is part of util-linux.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# Copyright (C) 2026 Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
+
+TS_TOPDIR="${0%/*}/../.."
+TS_DESC="insert-range"
+
+. "$TS_TOPDIR"/functions.sh
+ts_init "$*"
+
+ts_check_test_command "$TS_CMD_FALLOCATE"
+ts_check_test_command "$TS_CMD_HEXDUMP"
+ts_check_test_command "$TS_CMD_FINDMNT"
+ts_check_prog "stat"
+
+TEST_FILE="${TS_OUTDIR}/${TS_TESTNAME}.data"
+# We have to properly align the different data blocks
+# to the logical filesystem block size otherwise fallocate
+# will fail with EINVAL.
+BLKSIZE="$(stat --file-system --format=%s "$TS_OUTDIR")"
+
+# The two patterns are used to create distinct data blocks of size $BLKSIZE
+# and will help to verify the data block shift.
+#
+# Our test file's data block patterns will look like this:
+#
+# bs bytes bs bytes
+# |aaaaaaaa...|ffffffff...|
+# insert here ------^
+#
+# to obtain this
+# bs bytes bs bytes bs bytes
+# |aaaaaaaa...|00000000...|ffffffff...|
+#
+{
+ printf '%*s' "$BLKSIZE" '' | tr ' ' '\252'
+ printf '%*s' "$BLKSIZE" '' | tr ' ' '\377'
+} >"$TEST_FILE"
+
+# After this command the block with 'ff' should be shifted
+# $BLKSIZE
+"$TS_CMD_FALLOCATE" --insert-range --offset "$BLKSIZE" --length "$BLKSIZE" \
+ "$TEST_FILE" >>"$TS_OUTPUT" 2>>"$TS_ERRLOG"
+
+size_after="$(stat --format=%s "$TEST_FILE")"
+
+if (( size_after != (BLKSIZE * 3) )); then
+ rm -f "$TEST_FILE"
+ ts_failed "file not properly resized (size: $size_after, block size: $BLKSIZE)"
+fi
+
+"$TS_CMD_HEXDUMP" --canonical "$TEST_FILE" | sed -e 's/^[[:alnum:]]*[[:space:]]*//g' \
+ >>"$TS_OUTPUT" 2>>"$TS_ERRLOG"
+
+rm -f "$TEST_FILE"
+
+ts_finalize