From 7907f67d07d36a7e20421a1ec3a0eceecac4aacd Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Tue, 20 Sep 2022 03:01:38 +0000
Subject: CTAN sync 202209200301

---
 biblio/bibtex/bibtex-x/tests/testname.bst | 64 +++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 biblio/bibtex/bibtex-x/tests/testname.bst

(limited to 'biblio/bibtex/bibtex-x/tests/testname.bst')

diff --git a/biblio/bibtex/bibtex-x/tests/testname.bst b/biblio/bibtex/bibtex-x/tests/testname.bst
new file mode 100644
index 0000000000..d9addb41d0
--- /dev/null
+++ b/biblio/bibtex/bibtex-x/tests/testname.bst
@@ -0,0 +1,64 @@
+% BibTeX test style file
+% Copyright 2022 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
+% You may freely use, modify and/or distribute this file.
+
+ENTRY {author}{}{}
+
+STRINGS { s }
+
+INTEGERS { nameptr namesleft numnames }
+
+FUNCTION {format.names}
+{ 's :=
+  #1 'nameptr :=
+  s num.names$ 'numnames :=
+  numnames 'namesleft :=
+    { namesleft #0 > }
+    { " [" nameptr int.to.str$ * "]" * write$
+      " {ff} " s nameptr "{ff}" format.name$ * write$
+      " {ll} " s nameptr "{ll}" format.name$ * write$
+      " {vv} " s nameptr "{vv}" format.name$ * write$
+      " {jj} " s nameptr "{jj}" format.name$ * write$ newline$
+      " | " s nameptr "{ff}{vv}{ll}{jj}" format.name$ * write$
+      " | " s nameptr "{ff }{vv }{ll}{ jj}" format.name$ * write$
+      " | " s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ * write$
+      " | " s nameptr "{f.~}{v.~}{ll}{, jj}" format.name$ * write$
+           newline$
+      nameptr #1 + 'nameptr :=
+      namesleft #1 - 'namesleft :=
+    }
+  while$
+}
+
+FUNCTION {output_entry} {
+  "\item "    author * write$ newline$
+    author format.names
+}
+
+FUNCTION {book} {output_entry}
+
+READ
+
+FUNCTION {set_sort_key} {
+  author 'sort.key$ :=
+}
+
+ITERATE {set_sort_key}
+
+SORT
+
+FUNCTION {output_bgn} {
+  "\section*{Test result}" write$ newline$
+  "\begin{itemize}" write$ newline$
+}
+
+FUNCTION {output_end} {
+  "\end{itemize}" write$ newline$
+  "\endinput" write$ newline$
+}
+
+EXECUTE {output_bgn}
+
+ITERATE {call.type$}
+
+EXECUTE {output_end}
-- 
cgit v1.2.3

