Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm mainly a Windows guy, programming C#, but I often do use technologies that were intended for Linux machines like git, MySQL, perl scripts, memcached, php, etc... And therefore I am exposed to these tools.

I like looking at the code base of these tools every once in a while, and something I realized in many code bases is a folder called t with a bunch of files with the t extension.

What are these files?

How come the folder doesn't have a more descriptive name?

share|improve this question
up vote 1 down vote accepted

What are these files?

The $PROJECT/t directory is the canonical place for a project to keep its automated unit tests.

How come the folder doesn't have a more descriptive name?

By adhering to what is basically a standard naming convention, it is perfectly descriptive of what files go into this directory.

Other programmers will expect to find a /t subdirectory containing unit tests. It would be confusing if they decided to call it something different.

I am not sure why this is a standard, but presumably it is because /t would not likely be used as a name for some other component of a project (whereas /test could feasibly refer to something different than unit tests in the context of a given project).

It is also faster to type ./t/check_something.

share|improve this answer
Thanks. I think the problem is that we [programmers] got used to bad IDE's for too long. With nowadays' IDE's and technologies like Intellisense (Microsoft's term - don't know what it's called in other IDE's) there's no need for being cheap with naming. Not in code and not in the structure tree... :) – gillyb Dec 5 '12 at 10:26

From my experience, the t/ directory usually include automated tests.

Quoting from the Git t/README file

Core GIT Tests

This directory holds many test scripts for core GIT tools.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.