Skip to content

Commit 2ad24a4

Browse files
committed
tests: add information about the crlf data generator
The CRLF data generator is somewhat obscure; add information about how to use it and what it does.
1 parent a511584 commit 2ad24a4

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/resources/crlf_data/README

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This test data was generated using the `tests/resources/generate_crlf.sh`
2+
script. Please see that script for usage information.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
#!/usr/bin/env bash
2+
#
3+
# This script will generate the test corpus for CR/LF data using git;
4+
# we create files with all possible line ending varieties (all LF, all
5+
# CRLF, mixed, etc) on all the possible line ending configurations
6+
# (`core.autocrlf=true`, `text=auto` in gitattributes, etc). This
7+
# allows us to validate that our configuration will match byte-for-byte
8+
# the configuration that git produces.
9+
#
10+
# To update the test resource data, from the test resource directory:
11+
# git rm -r ./crlf_data
12+
# sh ./generate_crlf.sh ./crlf ./crlf_data /tmp/crlf_gitdirs
13+
# git add ./crlf_data
214

315
set -e
416

0 commit comments

Comments
 (0)