# CSL tests: copying CSL code into fixtures

**URL:** <https://discourse.citationstyles.org/t/csl-tests-copying-csl-code-into-fixtures/1240>\
**Category:** CSL Development\
**Created:** [November 12, 2014, 1:54am UTC](https://discourse.citationstyles.org/t/csl-tests-copying-csl-code-into-fixtures/1240 "2014-11-12T01:54:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [November 12, 2014, 1:54am UTC](https://discourse.citationstyles.org/t/csl-tests-copying-csl-code-into-fixtures/1240/1 "2014-11-12T01:54:49Z")

</div>

One of the ratty aspects of the standard CSL test fixtures is that  
many (77 of them) call external styles. For example:

```
https://bitbucket.org/bdarcus/citeproc-test/src/846e241d5875b25956f23f5bd8f4a7da73e88215/processor-tests/humans/bugreports_AllCapsLeakage.txt?at=default

```

The source of these styles is the test suite repo itself. They do not  
change over time, so there is no real reason to store them separately.

As a first step toward cleaning up the suite, I would like to copy the  
code of called styles into the fixtures themselves, so that each is  
fully self-contained.

This shouldn’t affect the operation of test frameworks at all, but it  
will a large check-in, so I thought I should run the plan past the  
list before making the change. I have a script ready for the purpose,  
but I’ll hold off in case anyone has reservations.

The fixtures could use a _lot_ more work to make them more informative  
and easier to work with, but this seems to be a good place to start.

Frank

---

<div class="post-metadata">

**Author:** ![Charles\_Parnot](https://avatars.discourse-cdn.com/v4/letter/c/57b2e6/32.png) [@Charles\_Parnot](https://discourse.citationstyles.org/u/Charles_Parnot)\
**Post date:** [November 12, 2014, 6:06am UTC](https://discourse.citationstyles.org/t/csl-tests-copying-csl-code-into-fixtures/1240/2 "2014-11-12T06:06:36Z")

</div>

Hi Frank,

I thought there were two advantages to this setup:

- multiple tests can share a style (could be considered a problem, as modiyfing a style can affect multiple tests)
- can reduce readbility of the tests when using very large styles

That said, I am not against it at all, just bringing up those 2 points just in case 🙂

Best wishes,

Charles

> **[Findings - All Your Research, In One App](https://findingsapp.com/)**
>
> Lab notebook app: organize your experiments, keep track of results, manage your protocols. Free for Mac (Basic version), iOS and Watch. Findings reinvents the lab journal, and is a new take on Electronic Lab Notebook (ELN) software.

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [November 12, 2014, 8:45pm UTC](https://discourse.citationstyles.org/t/csl-tests-copying-csl-code-into-fixtures/1240/3 "2014-11-12T20:45:14Z")

</div>

> Hi Frank,
> 
> I thought there were two advantages to this setup:
> 
> - multiple tests can share a style (could be considered a problem, as modiyfing a style can affect multiple tests)

Yes. I’ll keep the code that reads in an external CSL file in my own  
test runner, because it’s really handy for debugging. It’s just that  
the distributed tests in the suite should be atomic. As you say, it  
makes them more stable.

> - can reduce readbility of the tests when using very large styles

Yes. You do lose the convenience of a dedicated XML editor (until a  
CSL test editor emerges …).
