diff --git a/src/formatted_quine.cairo b/src/formatted_quine.cairo index f328e4d..2c96a4a 100644 --- a/src/formatted_quine.cairo +++ b/src/formatted_quine.cairo @@ -1 +1,11 @@ -fn main() {} +pub fn main() { + let mut q = Default::default(); + let mut n = q.clone(); + q.append_word(34, 1); + n.append_word(10, 1); + let s: ByteArray = + "pub fn main() {{{n} let mut q = Default::default();{n} let mut n = q.clone();{n} q.append_word(34, 1);{n} n.append_word(10, 1);{n} let s: ByteArray ={n} {q}{s}{q};{n} println!({n} {q}{s}{q}{n} );{n}}}{n}"; + println!( + "pub fn main() {{{n} let mut q = Default::default();{n} let mut n = q.clone();{n} q.append_word(34, 1);{n} n.append_word(10, 1);{n} let s: ByteArray ={n} {q}{s}{q};{n} println!({n} {q}{s}{q}{n} );{n}}}{n}" + ); +} diff --git a/src/test.cairo b/src/test.cairo index 8b13789..6ccf024 100644 --- a/src/test.cairo +++ b/src/test.cairo @@ -1 +1,6 @@ +use quines::formatted_quine::main as formatted_quine_main; +#[test] +fn test_formatted_quine() { + formatted_quine_main(); +}