Update the build script
This commit is contained in:
@@ -3,6 +3,7 @@ name = "google_speech"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Uttarayan Mondal <uttarayan21@gmail.com>"]
|
authors = ["Uttarayan Mondal <uttarayan21@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
build = "build.rs"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
// OUT_DIR is only defined when there is a build script
|
||||||
|
// https://github.com/rust-lang/cargo/issues/879#issuecomment-215491052
|
||||||
|
pub fn main() {}
|
||||||
+1
-1
@@ -8,7 +8,7 @@ fn test_hello_play() {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_hello_save() {
|
fn test_hello_save() {
|
||||||
let hello = Speech::new("Hello", Lang::en_us).unwrap();
|
let hello = Speech::new("Hello", Lang::en_us).unwrap();
|
||||||
unsafe { hello.save("target/hello.mp3").unwrap() };
|
unsafe { hello.save(concat!(env!("OUT_DIR"), "/hello.mp3")).unwrap() };
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[test]
|
// #[test]
|
||||||
|
|||||||
Reference in New Issue
Block a user