diff --git a/README.md b/README.md
index 6f0038523f0524a6ff9bf34f7d0ec8d9b58c4983..54bfd785727088a900e96abfddae7b870380b126 100644
--- a/README.md
+++ b/README.md
@@ -69,6 +69,35 @@ TACCATGAGGTAGTAGGTTGTATAGTT.....................................................
 .........................................................TATACAATCTACTGTCTTTCCT.        1
 ```
 
+## Example
+
+There is a set of test files available in directory `tests/`. If you are in
+the repository root directory, and all dependencies are installed and
+available, you can use the following command to run a test:
+
+```bash
+ascii_alignment_pileup.R \
+  --verbose \
+  --annotations="tests/test_files/test.gff" \
+  --output-directory="$PWD" \
+  "tests/test_files/test.bed" \
+  "tests/test_files/test.bam"
+```
+
+Note that if you build a Docker image from the provided `Dockerfile` or pull
+one of the prebuilt images (see section [Requirements](#requirements)), the
+test files are included in those images. Therefore, you can also run the tests
+in a container. To do that, start a container with:
+
+```bash
+docker run --rm -it <IMAGE_ID> /bin/bash
+```
+
+Then run the test command above.
+
+In both cases, a successful test will create a file
+`test.hsa-let-7a-1.min.1.pileup.tab` in the current working directory.
+
 ## Options
 
 ```console
diff --git a/ascii_alignment_pileup.R b/ascii_alignment_pileup.R
old mode 100644
new mode 100755
diff --git a/tests/test_files/test.bam b/tests/test_files/test.bam
new file mode 100644
index 0000000000000000000000000000000000000000..22d87f0ceb2ede21cb6bea4c9a693dc2c88a537b
Binary files /dev/null and b/tests/test_files/test.bam differ
diff --git a/tests/test_files/test.bam.bai b/tests/test_files/test.bam.bai
new file mode 100644
index 0000000000000000000000000000000000000000..9ac006efd3ce5851200a72d391f018eb8ad9735d
Binary files /dev/null and b/tests/test_files/test.bam.bai differ
diff --git a/tests/test_files/test.bed b/tests/test_files/test.bed
new file mode 100644
index 0000000000000000000000000000000000000000..b75f3526e2a97b5db935e5984b3828f7c155b4cc
--- /dev/null
+++ b/tests/test_files/test.bed
@@ -0,0 +1 @@
+9	94175956	94176036	hsa-let-7a-1	0	+
diff --git a/tests/test_files/test.gff b/tests/test_files/test.gff
new file mode 100644
index 0000000000000000000000000000000000000000..00e05f02347173d012ce93db78bb4318435c4b8d
--- /dev/null
+++ b/tests/test_files/test.gff
@@ -0,0 +1,3 @@
+9	.	miRNA_primary_transcript	94175957	94176036	.	+	.	ID=MI0000060;Alias=MI0000060;Name=hsa-let-7a-1
+9	.	miRNA	94175962	94175983	.	+	.	ID=MIMAT0000062_2;Alias=MIMAT0000062;Name=hsa-let-7a-5p;Derives_from=MI0000060
+9	.	miRNA	94176013	94176033	.	+	.	ID=MIMAT0004481_1;Alias=MIMAT0004481;Name=hsa-let-7a-3p;Derives_from=MI0000060