From 99e5114a8b22ce692fb6cbf26b0b11908dde69e8 Mon Sep 17 00:00:00 2001
From: Thibaut Horel <thibaut.horel@gmail.com>
Date: Sun, 21 Feb 2016 22:21:06 -0500
Subject: Add a few tests

---
 testdata/names.bst | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 testdata/names.bst

(limited to 'testdata/names.bst')

diff --git a/testdata/names.bst b/testdata/names.bst
new file mode 100644
index 0000000..a72e888
--- /dev/null
+++ b/testdata/names.bst
@@ -0,0 +1,38 @@
+ENTRY
+  {
+    author
+  }
+  {}
+  { label }
+
+INTEGERS { nameptr namesleft numnames }
+
+STRINGS { s t }
+
+FUNCTION {format.names}
+{ 's :=
+  #1 'nameptr :=
+  s num.names$ 'numnames :=
+  numnames 'namesleft :=
+  { namesleft #0 > }
+    {
+      s nameptr "{ff}|{vv}|{ll}|{jj}" format.name$ write$ newline$
+      s nameptr "{f}|{v}|{l}|{j}" format.name$ write$ newline$
+      s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ write$ newline$
+      s nameptr "{f~}{vv~}{ll}{, jj}" format.name$ write$ newline$
+      namesleft #1 - 'namesleft :=
+      nameptr #1 + 'nameptr :=
+    }
+  while$
+}
+
+FUNCTION {format.authors}
+{ author empty$
+    { "" }
+    { author format.names }
+  if$
+}
+
+READ
+
+ITERATE {format.authors}
-- 
cgit v1.2.3-70-g09d2

