aboutsummaryrefslogtreecommitdiff
path: root/lib/text/diff/testdata
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-04-12 17:38:32 +0700
committerShulhan <ms@kilabit.info>2026-04-12 19:01:45 +0700
commitbfa79cf52d62418f622289cee7c1fe5807c73be6 (patch)
tree240547182a2448ffa79feec94c9787f2c4466d3c /lib/text/diff/testdata
parent8604b86d6e18bfdc9d2f8123a19bc8ed4dbfddb2 (diff)
downloadpakakeh.go-bfa79cf52d62418f622289cee7c1fe5807c73be6.tar.xz
text/diff: add example for Files, Lines, Text, and Unified
While at it, - reorganize the order of functions alphabetically, following the order from doc. - changes the [Line.String] to print text in double quoted to help human compare the changes for non-printable characters.
Diffstat (limited to 'lib/text/diff/testdata')
-rw-r--r--lib/text/diff/testdata/lao.txt11
-rw-r--r--lib/text/diff/testdata/tzu.txt13
2 files changed, 24 insertions, 0 deletions
diff --git a/lib/text/diff/testdata/lao.txt b/lib/text/diff/testdata/lao.txt
new file mode 100644
index 00000000..635ef2c4
--- /dev/null
+++ b/lib/text/diff/testdata/lao.txt
@@ -0,0 +1,11 @@
+The Way that can be told of is not the eternal Way;
+The name that can be named is not the eternal name.
+The Nameless is the origin of Heaven and Earth;
+The Named is the mother of all things.
+Therefore let there always be non-being,
+ so we may see their subtlety,
+And let there always be being,
+ so we may see their outcome.
+The two are the same,
+But after they are produced,
+ they have different names.
diff --git a/lib/text/diff/testdata/tzu.txt b/lib/text/diff/testdata/tzu.txt
new file mode 100644
index 00000000..5af88a8f
--- /dev/null
+++ b/lib/text/diff/testdata/tzu.txt
@@ -0,0 +1,13 @@
+The Nameless is the origin of Heaven and Earth;
+The named is the mother of all things.
+
+Therefore let there always be non-being,
+ so we may see their subtlety,
+And let there always be being,
+ so we may see their outcome.
+The two are the same,
+But after they are produced,
+ they have different names.
+They both may be called deep and profound.
+Deeper and more profound,
+The door of all subtleties!