Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
nulldatamap committed Jan 8, 2015
0 parents commit f85b276
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/target
/Cargo.lock
/src/tmp*
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[package]

name = "version"
version = "1.0.0"
authors = ["Nulldata <thebreadcat@gmail.com>"]
15 changes: 15 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#![feature(macro_rules)]

macro_rules! version(
() => (
format!( "{}.{}.{}", env!( "CARGO_PKG_VERSION_MAJOR" )
, env!( "CARGO_PKG_VERSION_MINOR" )
, env!( "CARGO_PKG_VERSION_PATCH" ) )
)
);

#[test]
fn does_it_work() {
// Bad test is bad.
assert_eq!( version!(), "1.0.0" );
}

0 comments on commit f85b276

Please sign in to comment.