Bats Installation: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * bats =Installation on Mac= brew install bats =Installation on Linux= wget -O bat.zip https://github.com/sharkdp/bat/releases/download/v0....")
 
 
(12 intermediate revisions by the same user not shown)
Line 3: Line 3:
* [[bats#Subjects|bats]]
* [[bats#Subjects|bats]]


=Installation on Mac=
=bats-core Installation=
==bats-core Installation on Mac==
<syntaxhighlight lang='bash'>
# If bats was installed before:
brew unlink bats


brew install bats
brew install bats-core


=Installation on Linux=
bats --version
Bats 1.2.1
</syntaxhighlight>


wget -O bat.zip https://github.com/sharkdp/bat/releases/download/v0.8.0/bat-v0.8.0-x86_64-unknown-linux-musl.tar.gz
==bats-core Installation on Linux==
tar -xvzf bat.zip -C /usr/local
{{External|https://bats-core.readthedocs.io/en/stable/installation.html#any-os-installing-bats-from-source}}
mv /usr/local/bat-v0.8.0-x86_64-unknown-linux-musl /usr/local/bat
<syntaxhighlight lang='bash'>
  alias bat='/usr/local/bat/bat'
git clone https://github.com/bats-core/bats-core.git
</syntaxhighlight>
The <code>bats</code> script will be available as <code>./bats-core/bin/bats</code>
 
Optionally, it can be installed in a different location with:
<syntaxhighlight lang='bash'>
cd bats-core; ./install.sh <new-directory>
</syntaxhighlight>
 
=bats Installation=
 
{{Warn|Obsolete}}
 
==bats Installation on Mac==
 
<syntaxhighlight lang='bash'>
brew install bats
bats --version
0.4.0
</syntaxhighlight>
 
==bats Installation on Linux==
 
git clone https&#58;//github.com/sstephenson/bats.git
  cd bats
sudo ./install.sh /usr/local/

Latest revision as of 00:27, 3 May 2023

Internal

bats-core Installation

bats-core Installation on Mac

# If bats was installed before:
brew unlink bats

brew install bats-core

bats --version
Bats 1.2.1

bats-core Installation on Linux

https://bats-core.readthedocs.io/en/stable/installation.html#any-os-installing-bats-from-source
git clone https://github.com/bats-core/bats-core.git

The bats script will be available as ./bats-core/bin/bats

Optionally, it can be installed in a different location with:

cd bats-core; ./install.sh <new-directory>

bats Installation


Obsolete

bats Installation on Mac

brew install bats
bats --version
0.4.0

bats Installation on Linux

git clone https://github.com/sstephenson/bats.git
cd bats
sudo ./install.sh /usr/local/